From 381c76641f1dff5833cd5cd2c784b3e7cfd1d95c Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Thu, 9 Dec 2021 14:20:15 -0500 Subject: [PATCH] hosts/Infini-FRAMEWORK: refactor to store uuid --- .../hardware-configuration.nix | 62 ++++++++++--------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/hosts/Infini-FRAMEWORK/hardware-configuration.nix b/hosts/Infini-FRAMEWORK/hardware-configuration.nix index 902b24d..2f827ad 100644 --- a/hosts/Infini-FRAMEWORK/hardware-configuration.nix +++ b/hosts/Infini-FRAMEWORK/hardware-configuration.nix @@ -16,40 +16,44 @@ in boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems = { - "/" = { - device = "none"; - fsType = "tmpfs"; - options = [ "defaults" "size=4G" "mode=755" ]; - }; + fileSystems = + let + main = uuid "a44af0ff-5667-465d-b80a-1934d1aab8d9"; + in + { + "/" = { + device = "none"; + fsType = "tmpfs"; + options = [ "defaults" "size=4G" "mode=755" ]; + }; - "/persist" = { - device = uuid "a44af0ff-5667-465d-b80a-1934d1aab8d9"; - fsType = "btrfs"; - options = [ "subvol=root" "autodefrag" "noatime" "ssd" ]; - neededForBoot = true; - }; + "/persist" = { + device = main; + fsType = "btrfs"; + options = [ "subvol=root" "autodefrag" "noatime" "ssd" ]; + neededForBoot = true; + }; - "/nix" = { - device = uuid "a44af0ff-5667-465d-b80a-1934d1aab8d9"; - fsType = "btrfs"; - options = [ "subvol=nix" "autodefrag" "noatime" "ssd" ]; - neededForBoot = true; - }; + "/nix" = { + device = main; + fsType = "btrfs"; + options = [ "subvol=nix" "autodefrag" "noatime" "ssd" ]; + neededForBoot = true; + }; - "/boot" = { - device = uuid "a44af0ff-5667-465d-b80a-1934d1aab8d9"; - fsType = "btrfs"; - options = [ "subvol=boot" "autodefrag" "noatime" "ssd" ]; - neededForBoot = true; - }; + "/boot" = { + device = main; + fsType = "btrfs"; + options = [ "subvol=boot" "autodefrag" "noatime" "ssd" ]; + neededForBoot = true; + }; - "/boot/efi" = { - device = uuid "3FC9-0182"; - fsType = "vfat"; - neededForBoot = true; + "/boot/efi" = { + device = uuid "3FC9-0182"; + fsType = "vfat"; + neededForBoot = true; + }; }; - }; swapDevices = [{ device = uuid "28672ffb-9f1c-462b-b49d-8a14b3dd72b3"; }];