summaryrefslogtreecommitdiff
path: root/phenex
diff options
context:
space:
mode:
authorKenny Ballou <kballou@devnulllabs.io>2019-10-30 09:15:40 -0600
committerKenny Ballou <kballou@devnulllabs.io>2019-10-30 09:15:40 -0600
commitf54116d934091c8d9cf2c601a3f876b69dca2ec4 (patch)
treebe588d26f75144b2b539682308d1e739e5300e22 /phenex
parentd48111602177b86f547245dfa8a07668bff5852f (diff)
downloadcfg.nix-f54116d934091c8d9cf2c601a3f876b69dca2ec4.tar.gz
cfg.nix-f54116d934091c8d9cf2c601a3f876b69dca2ec4.tar.xz
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 <kballou@devnulllabs.io>
Diffstat (limited to 'phenex')
-rw-r--r--phenex/configuration.nix11
-rw-r--r--phenex/hardware-configuration.nix70
2 files changed, 10 insertions, 71 deletions
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 =
- [ <nixpkgs/nixos/modules/installer/scan/not-detected.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";
-
- 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";
-}