refactor: Move sw into properly nested modules with unconditional import
This commit is contained in:
@@ -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" ''
|
||||
|
||||
Reference in New Issue
Block a user