feat: Add iso and lxc generation artifacts
This commit is contained in:
committed by
Hunter Halloran
parent
5f68f6011c
commit
6498e7fd52
@@ -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 = {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
];
|
||||
services.vscode-server.enable = true;
|
||||
system.stateVersion = "25.11";
|
||||
host.buildMethods = lib.mkDefault [ "lxc" "proxmox" ];
|
||||
}
|
||||
)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user