From f54116d934091c8d9cf2c601a3f876b69dca2ec4 Mon Sep 17 00:00:00 2001 From: Kenny Ballou Date: Wed, 30 Oct 2019 09:15:40 -0600 Subject: phenex: use generated hardware-configuration Move boot-loader customizations out of saved `hardware-configuration.nix` and into main configuration file. Remove saved `hardware-configuration.nix` and use the generated one. When adding another volume from LVM, the new generation's `/etc/fstab` did not have the new entries. By removing the saved copy and relying on the generated copy, the ease of configuration and future changes is simplified considerably. Signed-off-by: Kenny Ballou --- phenex/configuration.nix | 11 +++++- phenex/hardware-configuration.nix | 70 --------------------------------------- 2 files changed, 10 insertions(+), 71 deletions(-) delete mode 100644 phenex/hardware-configuration.nix (limited to 'phenex') diff --git a/phenex/configuration.nix b/phenex/configuration.nix index b67cc42..49a0671 100644 --- a/phenex/configuration.nix +++ b/phenex/configuration.nix @@ -6,7 +6,7 @@ { imports = - [ ./hardware-configuration.nix + [ ../hardware-configuration.nix ../secrets.nix ../overlays.nix ../services/clamav.nix @@ -32,6 +32,15 @@ ../system/yubikey-gpg.nix ]; + # Use the GRUB 2 boot loader. + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + boot.loader.grub.devices = [ + "/dev/disk/by-id/wwn-0x5002538e000c21b7" + "/dev/disk/by-id/wwn-0x5002538e40de02bf" + ]; + boot.initrd.luks.devices.cryptroot.device = "/dev/disk/by-uuid/64dbda22-7a05-4d1c-a64b-bbbc779f1bdc"; + networking.hostName = "phenex"; # Some programs need SUID wrappers, can be configured further or are diff --git a/phenex/hardware-configuration.nix b/phenex/hardware-configuration.nix deleted file mode 100644 index 4e77fdb..0000000 --- a/phenex/hardware-configuration.nix +++ /dev/null @@ -1,70 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, ... }: - -{ - imports = - [ - ]; - - # Use the GRUB 2 boot loader. - boot.loader.grub.enable = true; - boot.loader.grub.version = 2; - boot.loader.grub.devices = [ - "/dev/disk/by-id/wwn-0x5002538e000c21b7" - "/dev/disk/by-id/wwn-0x5002538e40de02bf" - ]; - boot.initrd.luks.devices.cryptroot.device = "/dev/disk/by-uuid/64dbda22-7a05-4d1c-a64b-bbbc779f1bdc"; - - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/5767e0c7-98bb-4d4c-9791-270560bf2b25"; - fsType = "ext4"; - }; - - fileSystems."/home" = - { device = "/dev/disk/by-uuid/7f348443-ac88-427a-979a-6bcc359ab47a"; - fsType = "xfs"; - }; - - fileSystems."/gnu" = - { device = "/dev/disk/by-uuid/9b6bc9c3-3466-4811-8997-90bf273f8a0f"; - fsType = "xfs"; - }; - - fileSystems."/nix" = - { device = "/dev/disk/by-uuid/47b6583e-93f0-4291-bfc1-d965dde50e74"; - fsType = "xfs"; - }; - - fileSystems."/var" = - { device = "/dev/disk/by-uuid/2e794e37-bcca-4d4a-91a5-63803f3363d1"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/597144ea-1752-4c3d-a490-6ff5ce5237fc"; - fsType = "ext4"; - }; - - fileSystems."/opt" = - { device = "/dev/disk/by-uuid/54a24fe6-d33d-437d-8a8c-3cba0bae7d59"; - fsType = "ext4"; - }; - - fileSystems."/var/lib/docker" = - { device = "/dev/disk/by-uuid/7ece83d5-9f2f-4775-8efa-c53783f3a607"; - fsType = "btrfs"; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/493df1a1-83bd-4fec-8cbb-2242533751f0"; } - ]; - - nix.maxJobs = lib.mkDefault 4; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; -} -- cgit v1.2.1