From 5a0cb28f369c104bb371974df876c8c705b0ee7e Mon Sep 17 00:00:00 2001 From: ene Date: Sat, 18 Mar 2023 16:21:45 +0100 Subject: Refactor: Use better file layout --- hosts/server1/configuration.nix | 2 -- 1 file changed, 2 deletions(-) (limited to 'hosts/server1/configuration.nix') diff --git a/hosts/server1/configuration.nix b/hosts/server1/configuration.nix index 729ef0f..694b6b4 100644 --- a/hosts/server1/configuration.nix +++ b/hosts/server1/configuration.nix @@ -3,8 +3,6 @@ ./networking.nix # network configuration that just works ../../system - - ../../services ]; boot.cleanTmpDir = true; -- cgit 1.4.1 From 7881651fba877dd9a79c4c32422cd7305f0306b5 Mon Sep 17 00:00:00 2001 From: ene Date: Sun, 19 Mar 2023 17:58:43 +0100 Subject: Fix(system/hardware): Use actually needed modules and UUID The old values did work, but these should just make things a bit clearer. --- hosts/server1/configuration.nix | 2 +- system/hardware/default.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'hosts/server1/configuration.nix') diff --git a/hosts/server1/configuration.nix b/hosts/server1/configuration.nix index 694b6b4..ad3d8a3 100644 --- a/hosts/server1/configuration.nix +++ b/hosts/server1/configuration.nix @@ -10,7 +10,7 @@ networking.hostName = "server1"; networking.domain = "vhack.eu"; - system.fileSystemLayouts.mainDisk = "/dev/vda3"; + system.fileSystemLayouts.mainDisk = "/dev/disk/by-uuid/7d960eb9-9334-4aef-9f7c-9a908a91a6db"; system.stateVersion = "22.11"; } diff --git a/system/hardware/default.nix b/system/hardware/default.nix index c4c7dc9..9fabafe 100644 --- a/system/hardware/default.nix +++ b/system/hardware/default.nix @@ -4,6 +4,6 @@ (modulesPath + "/profiles/headless.nix") ]; boot.loader.grub.device = "/dev/vda"; - boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi"]; - boot.initrd.kernelModules = ["nvme" "btrfs"]; + boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk"]; + boot.initrd.kernelModules = []; } -- cgit 1.4.1 From 0b55d0277cd341eed9532677036e885c0ae038ed Mon Sep 17 00:00:00 2001 From: ene Date: Sun, 19 Mar 2023 18:01:16 +0100 Subject: Refactor(system/hardware): Move hardware to host The hardware settings are (somewhat) host specific, and putting them in `system` just builds the wrong expectations. --- hosts/server1/configuration.nix | 1 + hosts/server1/hardware.nix | 9 +++++++++ system/default.nix | 1 - system/hardware/default.nix | 9 --------- 4 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 hosts/server1/hardware.nix delete mode 100644 system/hardware/default.nix (limited to 'hosts/server1/configuration.nix') diff --git a/hosts/server1/configuration.nix b/hosts/server1/configuration.nix index ad3d8a3..891c5dc 100644 --- a/hosts/server1/configuration.nix +++ b/hosts/server1/configuration.nix @@ -1,6 +1,7 @@ {pkgs, ...}: { imports = [ ./networking.nix # network configuration that just works + ./hardware.nix ../../system ]; diff --git a/hosts/server1/hardware.nix b/hosts/server1/hardware.nix new file mode 100644 index 0000000..9fabafe --- /dev/null +++ b/hosts/server1/hardware.nix @@ -0,0 +1,9 @@ +{modulesPath, ...}: { + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + (modulesPath + "/profiles/headless.nix") + ]; + boot.loader.grub.device = "/dev/vda"; + boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk"]; + boot.initrd.kernelModules = []; +} diff --git a/system/default.nix b/system/default.nix index 9aa5d9e..d67ada2 100644 --- a/system/default.nix +++ b/system/default.nix @@ -1,7 +1,6 @@ {config, ...}: { imports = [ ./file_system_layouts - ./hardware ./packages ./services ./users diff --git a/system/hardware/default.nix b/system/hardware/default.nix deleted file mode 100644 index 9fabafe..0000000 --- a/system/hardware/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{modulesPath, ...}: { - imports = [ - (modulesPath + "/profiles/qemu-guest.nix") - (modulesPath + "/profiles/headless.nix") - ]; - boot.loader.grub.device = "/dev/vda"; - boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk"]; - boot.initrd.kernelModules = []; -} -- cgit 1.4.1