hosts/Infini-FRAMEWORK: slight refactor

This commit is contained in:
Infinidoge 2021-11-04 00:31:51 -04:00
parent 57163e8704
commit affeec6e6d

View file

@ -3,6 +3,9 @@
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
let
uuid = uuid: "/dev/disk/by-uuid/${uuid}";
in
{ {
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
@ -13,46 +16,42 @@
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems = fileSystems = {
let "/" = {
uuid = uuid: "/dev/disk/by-uuid/${uuid}"; device = "none";
in fsType = "tmpfs";
{ options = [ "defaults" "size=4G" "mode=755" ];
"/" = {
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" ];
neededForBoot = true;
};
"/nix" = {
device = uuid "a44af0ff-5667-465d-b80a-1934d1aab8d9";
fsType = "btrfs";
options = [ "subvol=nix" "autodefrag" "noatime" ];
neededForBoot = true;
};
"/boot" = {
device = uuid "a44af0ff-5667-465d-b80a-1934d1aab8d9";
fsType = "btrfs";
options = [ "subvol=boot" "autodefrag" "noatime" ];
neededForBoot = true;
};
"/boot/efi" = {
device = uuid "3FC9-0182";
fsType = "vfat";
neededForBoot = true;
};
}; };
swapDevices = [{ device = "/dev/disk/by-uuid/28672ffb-9f1c-462b-b49d-8a14b3dd72b3"; }]; "/persist" = {
device = uuid "a44af0ff-5667-465d-b80a-1934d1aab8d9";
fsType = "btrfs";
options = [ "subvol=root" "autodefrag" "noatime" ];
neededForBoot = true;
};
"/nix" = {
device = uuid "a44af0ff-5667-465d-b80a-1934d1aab8d9";
fsType = "btrfs";
options = [ "subvol=nix" "autodefrag" "noatime" ];
neededForBoot = true;
};
"/boot" = {
device = uuid "a44af0ff-5667-465d-b80a-1934d1aab8d9";
fsType = "btrfs";
options = [ "subvol=boot" "autodefrag" "noatime" ];
neededForBoot = true;
};
"/boot/efi" = {
device = uuid "3FC9-0182";
fsType = "vfat";
neededForBoot = true;
};
};
swapDevices = [{ device = uuid "28672ffb-9f1c-462b-b49d-8a14b3dd72b3"; }];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
# high-resolution display # high-resolution display