build container images
This commit is contained in:
parent
4ec4081ddb
commit
6e0d407b1c
1 changed files with 21 additions and 0 deletions
21
flake.nix
21
flake.nix
|
|
@ -88,6 +88,27 @@
|
||||||
installer-iso = iso-config.config.system.build.isoImage;
|
installer-iso = iso-config.config.system.build.isoImage;
|
||||||
installer-vm = iso-config.config.system.build.vm;
|
installer-vm = iso-config.config.system.build.vm;
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
// (
|
||||||
|
# Container tarballs for LXC deployment to Proxmox
|
||||||
|
# Only generates tarballs for hosts that import proxmox-lxc.nix
|
||||||
|
let
|
||||||
|
lxcHosts = builtins.filter (
|
||||||
|
name:
|
||||||
|
let
|
||||||
|
hostPath = ./hosts/${name}/default.nix;
|
||||||
|
content = builtins.readFile hostPath;
|
||||||
|
in
|
||||||
|
builtins.match ".*proxmox-lxc.nix.*" content != null
|
||||||
|
) (builtins.attrNames (builtins.readDir ./hosts));
|
||||||
|
in
|
||||||
|
builtins.foldl' (
|
||||||
|
result: name:
|
||||||
|
result
|
||||||
|
// {
|
||||||
|
"containers-${name}" = nixosConfigurations.${name}.config.system.build.tarball;
|
||||||
|
}
|
||||||
|
) { } lxcHosts
|
||||||
);
|
);
|
||||||
|
|
||||||
nixosConfigurations = builtins.foldl' (
|
nixosConfigurations = builtins.foldl' (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue