diff --git a/flake.nix b/flake.nix index ddd788f..f9b55f5 100644 --- a/flake.nix +++ b/flake.nix @@ -88,6 +88,27 @@ installer-iso = iso-config.config.system.build.isoImage; 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' (