diff --git a/os/hs/hardware-configuration.nix b/os/hs/hardware-configuration.nix index bc5dd4b..62a44fc 100644 --- a/os/hs/hardware-configuration.nix +++ b/os/hs/hardware-configuration.nix @@ -1,30 +1,48 @@ -# 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, modulesPath, ... }: - { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + config, + lib, + pkgs, + modulesPath, + ... +}: - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; +let + rootPartitionUUID = "21c23fb8-2f96-4b03-b50c-0ca10a96d0a0"; + rootPartitionDecryptedUUID = "e360258b-e712-43b1-9d3a-630041050ef1"; + bootPartitionUUID = "EAD9-8BF4"; +in +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usbhid" + "usb_storage" + "sd_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/0844f6dd-b3b9-4a25-8435-e24775f8a5c9"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/${rootPartitionDecryptedUUID}"; + fsType = "ext4"; + }; + boot.initrd.luks.devices."luks-${rootPartitionUUID}".device = + "/dev/disk/by-uuid/${rootPartitionUUID}"; - boot.initrd.luks.devices."luks-1f257dc8-c436-4a5c-8652-8d9b35faa34f".device = "/dev/disk/by-uuid/1f257dc8-c436-4a5c-8652-8d9b35faa34f"; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/CD7C-CD77"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/${bootPartitionUUID}"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; swapDevices = [ ];