diff options
| author | seth <[email protected]> | 2023-09-12 22:48:54 -0400 |
|---|---|---|
| committer | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-09-13 02:49:57 +0000 |
| commit | 7b065da4a02903489d0a82119bd5ab73636823b6 (patch) | |
| tree | d92ebdeb6cfad1d81f4d1f7643f331f34daf99a3 | |
| parent | 73fbfb24ec793d2a796922e59fce8feff6fdc515 (diff) | |
treewide: un-nest all attrsets
| -rw-r--r-- | flake.nix | 102 | ||||
| -rw-r--r-- | hosts/atlas/hardware-configuration.nix | 27 | ||||
| -rw-r--r-- | hosts/glados/hardware-configuration.nix | 69 | ||||
| -rw-r--r-- | users/seth/default.nix | 6 |
4 files changed, 121 insertions, 83 deletions
@@ -16,17 +16,21 @@ arkenfox = { url = "github:dwarfmaster/arkenfox-nixos"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.flake-compat.follows = "flake-compat"; - inputs.pre-commit.follows = "pre-commit"; - inputs.flake-utils.follows = "flake-utils"; + inputs = { + nixpkgs.follows = "nixpkgs"; + flake-compat.follows = "flake-compat"; + pre-commit.follows = "pre-commit"; + flake-utils.follows = "flake-utils"; + }; }; deploy = { url = "github:serokell/deploy-rs"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.utils.follows = "flake-utils"; - inputs.flake-compat.follows = "flake-compat"; + inputs = { + nixpkgs.follows = "nixpkgs"; + utils.follows = "flake-utils"; + flake-compat.follows = "flake-compat"; + }; }; parts = { @@ -36,15 +40,19 @@ getchoo = { url = "github:getchoo/nix-exprs"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.parts.follows = "parts"; + inputs = { + nixpkgs.follows = "nixpkgs"; + parts.follows = "parts"; + }; }; guzzle_api = { url = "github:getchoo/guzzle_api"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.parts.follows = "parts"; - inputs.pre-commit.follows = "pre-commit"; + inputs = { + nixpkgs.follows = "nixpkgs"; + parts.follows = "parts"; + pre-commit.follows = "pre-commit"; + }; }; hm = { @@ -54,13 +62,15 @@ lanzaboote = { url = "github:nix-community/lanzaboote"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.crane.follows = "crane"; - inputs.flake-compat.follows = "flake-compat"; - inputs.flake-parts.follows = "parts"; - inputs.flake-utils.follows = "flake-utils"; - inputs.pre-commit-hooks-nix.follows = "pre-commit"; - inputs.rust-overlay.follows = "rust-overlay"; + inputs = { + nixpkgs.follows = "nixpkgs"; + crane.follows = "crane"; + flake-compat.follows = "flake-compat"; + flake-parts.follows = "parts"; + flake-utils.follows = "flake-utils"; + pre-commit-hooks-nix.follows = "pre-commit"; + rust-overlay.follows = "rust-overlay"; + }; }; nix-index-database = { @@ -70,9 +80,11 @@ nixos-wsl = { url = "github:nix-community/NixOS-WSL"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.flake-compat.follows = "flake-compat"; - inputs.flake-utils.follows = "flake-utils"; + inputs = { + nixpkgs.follows = "nixpkgs"; + flake-compat.follows = "flake-compat"; + flake-utils.follows = "flake-utils"; + }; }; nur.url = "github:nix-community/NUR"; @@ -84,19 +96,23 @@ pre-commit = { url = "github:cachix/pre-commit-hooks.nix"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.nixpkgs-stable.follows = "nixpkgs"; - inputs.flake-compat.follows = "flake-compat"; - inputs.flake-utils.follows = "flake-utils"; + inputs = { + nixpkgs.follows = "nixpkgs"; + nixpkgs-stable.follows = "nixpkgs"; + flake-compat.follows = "flake-compat"; + flake-utils.follows = "flake-utils"; + }; }; ragenix = { url = "github:yaxitech/ragenix"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.agenix.follows = "agenix"; - inputs.crane.follows = "crane"; - inputs.flake-utils.follows = "flake-utils"; - inputs.rust-overlay.follows = "rust-overlay"; + inputs = { + nixpkgs.follows = "nixpkgs"; + agenix.follows = "agenix"; + crane.follows = "crane"; + flake-utils.follows = "flake-utils"; + rust-overlay.follows = "rust-overlay"; + }; }; # ------------------------------ @@ -105,9 +121,11 @@ agenix = { url = "github:ryantm/agenix"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.darwin.follows = "darwin"; - inputs.home-manager.follows = "hm"; + inputs = { + nixpkgs.follows = "nixpkgs"; + darwin.follows = "darwin"; + home-manager.follows = "hm"; + }; }; flake-compat = { @@ -119,16 +137,20 @@ crane = { url = "github:ipetkov/crane"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.flake-compat.follows = "flake-compat"; - inputs.flake-utils.follows = "flake-utils"; - inputs.rust-overlay.follows = "rust-overlay"; + inputs = { + nixpkgs.follows = "nixpkgs"; + flake-compat.follows = "flake-compat"; + flake-utils.follows = "flake-utils"; + rust-overlay.follows = "rust-overlay"; + }; }; rust-overlay = { url = "github:oxalica/rust-overlay"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.flake-utils.follows = "flake-utils"; + inputs = { + nixpkgs.follows = "nixpkgs"; + flake-utils.follows = "flake-utils"; + }; }; }; diff --git a/hosts/atlas/hardware-configuration.nix b/hosts/atlas/hardware-configuration.nix index 46b295b..00c6cd8 100644 --- a/hosts/atlas/hardware-configuration.nix +++ b/hosts/atlas/hardware-configuration.nix @@ -3,19 +3,26 @@ (modulesPath + "/profiles/qemu-guest.nix") ]; - boot.initrd.availableKernelModules = ["virtio_pci" "usbhid"]; - boot.initrd.kernelModules = []; - boot.kernelModules = []; - boot.extraModulePackages = []; + boot = { + extraModulePackages = []; + kernelModules = []; - fileSystems."/" = { - device = "/dev/disk/by-uuid/f0c84809-83f5-414b-a973-496d25d74c6d"; - fsType = "ext4"; + initrd = { + availableKernelModules = ["virtio_pci" "usbhid"]; + kernelModules = []; + }; }; - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/A253-0826"; - fsType = "vfat"; + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/f0c84809-83f5-414b-a973-496d25d74c6d"; + fsType = "ext4"; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/A253-0826"; + fsType = "vfat"; + }; }; swapDevices = []; diff --git a/hosts/glados/hardware-configuration.nix b/hosts/glados/hardware-configuration.nix index 21afbab..a7ff9e9 100644 --- a/hosts/glados/hardware-configuration.nix +++ b/hosts/glados/hardware-configuration.nix @@ -11,44 +11,51 @@ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-amd"]; - boot.extraModulePackages = []; + boot = { + extraModulePackages = []; + kernelModules = ["kvm-amd"]; - fileSystems."/" = { - device = "/dev/mapper/cryptroot"; - fsType = "btrfs"; - options = ["subvol=root" "compress=zstd" "noatime"]; - }; + initrd = { + availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"]; + kernelModules = []; - boot.initrd.luks.devices."cryptroot" = { - device = "/dev/disk/by-uuid/bbbc1f37-53f5-4776-a70e-f2779179de50"; - allowDiscards = true; - crypttabExtraOpts = ["tpm2-device=auto"]; + luks.devices."cryptroot" = { + device = "/dev/disk/by-uuid/bbbc1f37-53f5-4776-a70e-f2779179de50"; + allowDiscards = true; + crypttabExtraOpts = ["tpm2-device=auto"]; + }; + }; }; - fileSystems."/var/log" = { - device = "/dev/mapper/cryptroot"; - fsType = "btrfs"; - options = ["subvol=var_log" "compress=zstd" "noatime"]; - }; + fileSystems = { + "/" = { + device = "/dev/mapper/cryptroot"; + fsType = "btrfs"; + options = ["subvol=root" "compress=zstd" "noatime"]; + }; - fileSystems."/nix" = { - device = "/dev/mapper/cryptroot"; - fsType = "btrfs"; - options = ["subvol=nix" "compress=zstd" "noatime" "nodatacow"]; - }; + "/var/log" = { + device = "/dev/mapper/cryptroot"; + fsType = "btrfs"; + options = ["subvol=var_log" "compress=zstd" "noatime"]; + }; - fileSystems."/home" = { - device = "/dev/mapper/cryptroot"; - fsType = "btrfs"; - options = ["subvol=home" "compress=zstd" "noatime"]; - }; + "/nix" = { + device = "/dev/mapper/cryptroot"; + fsType = "btrfs"; + options = ["subvol=nix" "compress=zstd" "noatime" "nodatacow"]; + }; + + "/home" = { + device = "/dev/mapper/cryptroot"; + fsType = "btrfs"; + options = ["subvol=home" "compress=zstd" "noatime"]; + }; - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/B95B-9412"; - fsType = "vfat"; + "/boot" = { + device = "/dev/disk/by-uuid/B95B-9412"; + fsType = "vfat"; + }; }; swapDevices = []; diff --git a/users/seth/default.nix b/users/seth/default.nix index 80ee1bc..f188318 100644 --- a/users/seth/default.nix +++ b/users/seth/default.nix @@ -24,8 +24,10 @@ programs.fish.enable = true; - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + }; home-manager.users.seth = { imports = [ |
