feat: Add iso and lxc generation artifacts

This commit is contained in:
UGA Innovation Factory
2025-12-10 13:29:23 -05:00
committed by Hunter Halloran
parent 5f68f6011c
commit 6498e7fd52
9 changed files with 203 additions and 8 deletions

View File

@@ -23,6 +23,11 @@
description = "The size of the swap partition.";
};
};
buildMethods = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ "iso" ];
description = "List of allowed build methods (iso, lxc, proxmox).";
};
};
config = {

View File

@@ -69,11 +69,20 @@ let
{ }
) accounts;
in
lib.nixosSystem {
inherit system;
{
system = lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
specialArgs = { inherit inputs; };
modules =
commonModules
++ userFlakeModules
++ extraModules
++ [
{ networking.hostName = hostName; }
];
};
modules =
commonModules
++ userFlakeModules
@@ -122,17 +131,19 @@ let
"flakeUrl"
"hostname"
"modules"
"buildMethods"
];
extraConfig = lib.removeAttrs devConf [
"extraUsers"
"flakeUrl"
"hostname"
"buildMethods"
];
in
lib.mkIf hasOverride (lib.recursiveUpdate {
lib.mkIf hasOverride (lib.recursiveUpdate (lib.recursiveUpdate {
host.filesystem = fsConf;
modules.users.enabledUsers = devConf.extraUsers or [ ];
} extraConfig);
} (lib.optionalAttrs (devConf ? buildMethods) { host.buildMethods = devConf.buildMethods; })) extraConfig);
config = mkHost {
hostName = hostName;
@@ -170,5 +181,9 @@ let
}
) hosts;
allHosts = lib.foldl' lib.recursiveUpdate { } hostGroups;
in
lib.foldl' lib.recursiveUpdate { } hostGroups
{
nixosConfigurations = lib.mapAttrs (n: v: v.system) allHosts;
modules = lib.mapAttrs (n: v: v.modules) allHosts;
}

View File

@@ -39,7 +39,7 @@
host.filesystem.swapSize = lib.mkDefault "34G";
# Suspend / logind behavior
services.upower.enable = true;
services.upower.enable = lib.mkDefault true;
services.logind.settings = {
Login = {
HandleLidSwitch = "suspend";

View File

@@ -35,6 +35,7 @@
];
services.vscode-server.enable = true;
system.stateVersion = "25.11";
host.buildMethods = lib.mkDefault [ "lxc" "proxmox" ];
}
)
{