refactor(nixos): organize host modules #137

Merged
alexion merged 0 commits from refs/pull/137/head into main 2026-10-07 17:09:42 -04:00
7 changed files with 10 additions and 9 deletions
Showing only changes of commit ec1c0fba56 - Show all commits

No files matched your search

+1
View File
@@ -63,3 +63,4 @@
Generate it on the target system or live ISO, then stage it before evaluating the flake. Generate it on the target system or live ISO, then stage it before evaluating the flake.
- Configure the Chaotic Nyx cache only on hosts that select `linuxPackages_cachyos` (currently Neogaia - Configure the Chaotic Nyx cache only on hosts that select `linuxPackages_cachyos` (currently Neogaia
and Zeus), not in the generic host module. and Zeus), not in the generic host module.
- Module-relative paths resolve from the module file. Update them when moving a module into a subdirectory.
+1 -1
View File
@@ -12,7 +12,7 @@
./disk.nix ./disk.nix
]; ];
modules.kernel.cachyos.enable = true; modules.host.cachyos.enable = true;
# So wifi can be joined from the console. # So wifi can be joined from the console.
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
+1 -1
View File
@@ -58,7 +58,7 @@
boot.zfs.forceImportRoot = false; boot.zfs.forceImportRoot = false;
modules.zfs = { modules.host.zfs = {
enable = true; enable = true;
pools.pikachu = { }; pools.pikachu = { };
}; };
+1 -1
View File
@@ -14,7 +14,7 @@
nixpkgs.hostPlatform = "x86_64-linux"; nixpkgs.hostPlatform = "x86_64-linux";
modules.kernel.cachyos.enable = true; modules.host.cachyos.enable = true;
hardware.graphics = { hardware.graphics = {
enable = true; enable = true;
@@ -5,9 +5,9 @@
... ...
}: }:
{ {
options.modules.kernel.cachyos.enable = lib.mkEnableOption "CachyOS kernel"; options.modules.host.cachyos.enable = lib.mkEnableOption "CachyOS kernel";
config = lib.mkIf config.modules.kernel.cachyos.enable { config = lib.mkIf config.modules.host.cachyos.enable {
boot.kernelPackages = pkgs.linuxPackages_cachyos; boot.kernelPackages = pkgs.linuxPackages_cachyos;
nix.settings.extra-substituters = [ "https://nyx-cache.chaotic.cx/" ]; nix.settings.extra-substituters = [ "https://nyx-cache.chaotic.cx/" ];
@@ -5,7 +5,7 @@
... ...
}: }:
let let
hostSecrets = ../secrets + "/${config.networking.hostName}.yaml"; hostSecrets = ../../secrets + "/${config.networking.hostName}.yaml";
in in
{ {
options.modules.host.enable = lib.mkEnableOption "physical host configuration"; options.modules.host.enable = lib.mkEnableOption "physical host configuration";
@@ -33,7 +33,7 @@ in
services.xserver.xkb.options = "caps:escape_shifted_capslock"; services.xserver.xkb.options = "caps:escape_shifted_capslock";
console.useXkbConfig = true; console.useXkbConfig = true;
sops.defaultSopsFile = ../secrets/shared.yaml; sops.defaultSopsFile = ../../secrets/shared.yaml;
sops.age.keyFile = "/var/lib/sops-nix/key.txt"; sops.age.keyFile = "/var/lib/sops-nix/key.txt";
sops.age.sshKeyPaths = [ ]; sops.age.sshKeyPaths = [ ];
sops.gnupg.sshKeyPaths = [ ]; sops.gnupg.sshKeyPaths = [ ];
@@ -5,10 +5,10 @@
}: }:
# The host-level ZFS pool import: durable service state a host mounts, never rebuilds. # The host-level ZFS pool import: durable service state a host mounts, never rebuilds.
let let
cfg = config.modules.zfs; # NOLINT(let_order) cfg = config.modules.host.zfs; # NOLINT(let_order)
in in
{ {
options.modules.zfs = { options.modules.host.zfs = {
enable = lib.mkEnableOption "importing durable ZFS pools that hold service state"; enable = lib.mkEnableOption "importing durable ZFS pools that hold service state";
pools = lib.mkOption { pools = lib.mkOption {