refactor: Move sw into properly nested modules with unconditional import

This commit is contained in:
UGA Innovation Factory
2026-01-27 13:59:57 -05:00
parent bd50f894ae
commit f669845bf7
36 changed files with 788 additions and 347 deletions

View File

@@ -14,22 +14,42 @@ with lib;
hosts = mkOption {
type = types.listOf types.str;
default = [ "engr-ugaif@192.168.11.133 x86_64-linux" ];
description = "List of remote build hosts for system rebuilding.";
description = ''
List of remote build hosts for system rebuilding.
Format: "user@hostname architecture"
Each host must have SSH access and nix-daemon available.
Useful for offloading builds from low-power devices (tablets, laptops)
to more powerful build servers.
'';
example = lib.literalExpression ''
[
"builder@nix-builder x86_64-linux"
"user@192.168.1.100 aarch64-linux"
]'';
};
enable = mkOption {
type = types.bool;
default = false;
description = "Whether to enable remote build for 'update-system' command.";
description = ''
Whether to enable remote builds for the 'update-system' command.
When enabled, 'update-system' will use the configured remote hosts
to build the new system configuration instead of building locally.
Automatically enabled for tablet-kiosk systems.
'';
};
};
};
default = { };
description = "Remote build configuration";
description = "Remote build configuration for system updates.";
};
config = {
athenix.sw.remoteBuild.enable = lib.mkDefault (config.athenix.sw.type == "tablet-kiosk");
athenix.sw.remoteBuild.enable = lib.mkDefault (config.athenix.sw.tablet-kiosk.enable);
environment.systemPackages = [
(pkgs.writeShellScriptBin "update-system" ''