mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
switch to networkd
This commit is contained in:
parent
4068de6a5f
commit
019576dd7b
4 changed files with 45 additions and 26 deletions
|
|
@ -168,7 +168,7 @@
|
|||
</controller>
|
||||
<interface type="bridge">
|
||||
<mac address="52:54:00:05:03:2d"/>
|
||||
<source bridge="bridge0"/>
|
||||
<source bridge="br0"/>
|
||||
<model type="virtio"/>
|
||||
<link state="up"/>
|
||||
<address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
|
||||
|
|
|
|||
|
|
@ -80,31 +80,47 @@
|
|||
programs.adb.enable = true;
|
||||
|
||||
networking = {
|
||||
useNetworkd = false;
|
||||
useDHCP = false;
|
||||
hostId = "288b56db";
|
||||
nameservers = [
|
||||
"192.168.1.1"
|
||||
"2605:59c8:252e:500::1"
|
||||
];
|
||||
defaultGateway = "192.168.1.1";
|
||||
interfaces = {
|
||||
"enp11s0" = {
|
||||
name = "eth0";
|
||||
};
|
||||
"bridge0" = {
|
||||
name = "bridge0";
|
||||
macAddress = "D8:5E:D3:E5:47:90";
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.1.4";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
bridges."bridge0".interfaces = ["eth0"];
|
||||
firewall.enable = true;
|
||||
};
|
||||
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
netdevs."br0" = {
|
||||
netdevConfig = {
|
||||
Kind = "bridge";
|
||||
Name = "br0";
|
||||
};
|
||||
};
|
||||
networks = {
|
||||
"enp11s0" = {
|
||||
name = "enp11s0";
|
||||
bridge = ["br0"];
|
||||
linkConfig.RequiredForOnline = "enslaved";
|
||||
};
|
||||
"br0" = {
|
||||
name = "br0";
|
||||
address = [
|
||||
"192.168.1.4/24"
|
||||
];
|
||||
gateway = [
|
||||
"192.168.1.1"
|
||||
];
|
||||
dns = [
|
||||
"192.168.1.1"
|
||||
];
|
||||
DHCP = "no";
|
||||
bridgeConfig = {};
|
||||
linkConfig = {
|
||||
MACAddress = "D8:5E:D3:E5:47:90";
|
||||
RequiredForOnline = "routable";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#user managment
|
||||
sops.secrets = {
|
||||
gerg.neededForUsers = true;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{...}: {
|
||||
_: {
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
|
|
@ -156,8 +156,8 @@ in {
|
|||
'';
|
||||
in [
|
||||
"L /etc/Xorg/active.conf - - - - /etc/Xorg/2_mon.conf"
|
||||
"L+ /var/lib/libvirt/hooks/qemu - - - - ${qemuHook}"
|
||||
"L+ /var/lib/libvirt/qemu/Windows.xml - - - - ${./Windows.xml}"
|
||||
"C /var/lib/libvirt/hooks/qemu - - - - ${qemuHook}"
|
||||
"C /var/lib/libvirt/qemu/Windows.xml - - - - ${./Windows.xml}"
|
||||
];
|
||||
_file = ./vfio.nix;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,10 @@ _: {
|
|||
"L /etc/nixos/flake.nix - - - - /home/gerg/Projects/nixos/flake.nix"
|
||||
];
|
||||
#create machine-id for spotify
|
||||
environment.etc."machine-id".text = "b6431c2851094770b614a9cfa78fb6ea";
|
||||
environment.etc."machine-id" = {
|
||||
text = "b6431c2851094770b614a9cfa78fb6ea";
|
||||
mode = "0644";
|
||||
};
|
||||
#make sure the sopskey is found
|
||||
sops.age.sshKeyPaths = lib.mkForce ["/persist/ssh/ssh_host_ed25519_key"];
|
||||
fileSystems."/persist".neededForBoot = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue