From c196f5e44bc341b3a6fc6feecd62547b24653872 Mon Sep 17 00:00:00 2001 From: Hendrik Sokolowski Date: Tue, 11 Apr 2023 21:40:48 +0200 Subject: [PATCH] fix initrd modules and rename host --- flake.nix | 4 ++-- .../configuration.nix | 0 hosts/host-001-momo-koeln/default.nix | 6 ++++++ .../hardware-configuration.nix | 13 +++++++------ .../host-001-momo-koeln.nix} | 0 hosts/host_001_momo_koeln/default.nix | 6 ------ 6 files changed, 15 insertions(+), 14 deletions(-) rename hosts/{host_001_momo_koeln => host-001-momo-koeln}/configuration.nix (100%) create mode 100644 hosts/host-001-momo-koeln/default.nix rename hosts/{host_001_momo_koeln => host-001-momo-koeln}/hardware-configuration.nix (76%) rename hosts/{host_001_momo_koeln/host_001_momo_koeln.nix => host-001-momo-koeln/host-001-momo-koeln.nix} (100%) delete mode 100644 hosts/host_001_momo_koeln/default.nix diff --git a/flake.nix b/flake.nix index ed9bb346..a0499ac9 100644 --- a/flake.nix +++ b/flake.nix @@ -125,7 +125,7 @@ suites = with profiles; rec { base = [ base-user users.root users.barkeeper ]; - host_001_momo_koeln = base; + host-001-momo-koeln = base; }; }; }; @@ -153,7 +153,7 @@ homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations; deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { - host_001_momo_koeln = { + host-001-momo-koeln = { hostname = "80.244.242.4"; sshUser = "barkeeper"; }; diff --git a/hosts/host_001_momo_koeln/configuration.nix b/hosts/host-001-momo-koeln/configuration.nix similarity index 100% rename from hosts/host_001_momo_koeln/configuration.nix rename to hosts/host-001-momo-koeln/configuration.nix diff --git a/hosts/host-001-momo-koeln/default.nix b/hosts/host-001-momo-koeln/default.nix new file mode 100644 index 00000000..ffc0fda8 --- /dev/null +++ b/hosts/host-001-momo-koeln/default.nix @@ -0,0 +1,6 @@ +{ suites, ... }: +{ + imports = [ + ./host-001-momo-koeln.nix + ] ++ suites.host-001-momo-koeln; +} diff --git a/hosts/host_001_momo_koeln/hardware-configuration.nix b/hosts/host-001-momo-koeln/hardware-configuration.nix similarity index 76% rename from hosts/host_001_momo_koeln/hardware-configuration.nix rename to hosts/host-001-momo-koeln/hardware-configuration.nix index 39e05d60..d6a61a4d 100644 --- a/hosts/host_001_momo_koeln/hardware-configuration.nix +++ b/hosts/host-001-momo-koeln/hardware-configuration.nix @@ -11,27 +11,28 @@ # Define on which hard drive you want to install Grub. boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only - boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sd_mod" "sr_mod" ]; - boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_scsi" "sd_mod" "sr_mod" "dm-snapshot" "virtio_pci" ]; + boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; boot.initrd.luks.devices."cryptroot" = { - device = "/dev/disk/by-uuid/531ee357-5777-498f-abbf-64bb4cff9a14"; + device = "/dev/disk/by-label/cryptroot"; }; fileSystems."/" = - { device = "/dev/disk/by-uuid/f5b3152a-a3bd-46d1-968f-53d50fca921e"; + { device = "/dev/disk/by-label/root"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/1fd053f8-725b-418d-aed1-aee71dac2b62"; + { device = "/dev/disk/by-label/boot"; fsType = "ext4"; }; swapDevices = - [ { device = "/dev/disk/by-uuid/46191ecf-244c-4445-b1c0-ae3059871a70"; } + [ { device = "/dev/disk/by-label/swap"; } ]; networking = { diff --git a/hosts/host_001_momo_koeln/host_001_momo_koeln.nix b/hosts/host-001-momo-koeln/host-001-momo-koeln.nix similarity index 100% rename from hosts/host_001_momo_koeln/host_001_momo_koeln.nix rename to hosts/host-001-momo-koeln/host-001-momo-koeln.nix diff --git a/hosts/host_001_momo_koeln/default.nix b/hosts/host_001_momo_koeln/default.nix deleted file mode 100644 index 87aa4f50..00000000 --- a/hosts/host_001_momo_koeln/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ suites, ... }: -{ - imports = [ - ./host_001_momo_koeln.nix - ] ++ suites.host_001_momo_koeln; -}