diff --git a/hosts/homelab/configuration.nix b/hosts/homelab/configuration.nix index e07f6a5..cfd49b1 100644 --- a/hosts/homelab/configuration.nix +++ b/hosts/homelab/configuration.nix @@ -24,6 +24,6 @@ )) ]; - disko.cfg.mainDevice = "/dev/vda"; + disko.cfg.mainDevice = "/dev/disk/by-id/ata-AMD_R5M120G8_07092225C0040"; system.stateVersion = "26.05"; } diff --git a/hosts/homelab/hardware-configuration.nix b/hosts/homelab/hardware-configuration.nix index e7aa32d..bd42766 100644 --- a/hosts/homelab/hardware-configuration.nix +++ b/hosts/homelab/hardware-configuration.nix @@ -6,15 +6,16 @@ }: { imports = [ - (modulesPath + "/profiles/qemu-guest.nix") + (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" - "virtio_pci" - "sr_mod" - "virtio_blk" + "nvme" + "usb_storage" + "usbhid" + "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; @@ -22,7 +23,7 @@ # hdd fileSystems."/mnt/data" = { - device = "/dev/disk/by-label/data"; + device = "/dev/disk/by-id/ata-WDC_WD20EFPX-68C4TN0_WD-WX32DA423Z41"; fsType = "ext4"; options = [ "noatime" diff --git a/hosts/homelab/network.nix b/hosts/homelab/network.nix index 566b5ec..da1c29a 100644 --- a/hosts/homelab/network.nix +++ b/hosts/homelab/network.nix @@ -2,25 +2,28 @@ { networking = { hostName = "homelab"; - networkmanager.enable = true; useDHCP = false; - defaultGateway = "192.168.88.1"; - nameservers = [ - "192.168.88.1" - ]; - interfaces.enp1s0 = { - ipv4.addresses = [ - { - address = "192.168.88.5"; - prefixLength = 24; - } - ]; + networkmanager.enable = false; + }; + + systemd.network = { + enable = true; + networks."10-homelab-static-ip" = { + networkConfig = { + Address = "192.168.88.5/24"; + Gateway = "192.168.88.1"; + DNS = [ "192.168.88.1" ]; + }; + matchConfig.Name = "enp1s0"; + linkConfig.RequiredForOnline = "routable"; + firewall = { + allowedTCPPorts = [ + 22 + 80 + 443 + ]; + allowedUDPPorts = [ ]; + }; }; - firewall.allowedTCPPorts = [ - 22 - 80 - 443 - ]; - firewall.allowedUDPPorts = [ ]; }; }