Recursively include inputs for all inputs in disko closure.
This commit is contained in:
@@ -117,6 +117,40 @@
|
||||
];
|
||||
}
|
||||
) nodes;
|
||||
installerConfig =
|
||||
hostname: nodeConfig:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
targetSystem = self.nixosConfigurations."${hostname}";
|
||||
};
|
||||
modules = [
|
||||
./formats/installer.nix
|
||||
(
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
repl_path = toString ./.;
|
||||
nix-self-repl = pkgs.writeShellScriptBin "nix-self-repl" ''
|
||||
source /etc/set-environment
|
||||
nix repl "${repl_path}/repl.nix" "$@"
|
||||
'';
|
||||
# If we wanted the current version of a flake then we'd just launch
|
||||
# nix repl
|
||||
# and then run:
|
||||
# :lf /path/to/flake
|
||||
in
|
||||
{
|
||||
config = {
|
||||
environment.systemPackages = lib.mkIf config.nix.enable [ nix-self-repl ];
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = (builtins.mapAttrs (name: value: value "toplevel") nixosConfigs);
|
||||
@@ -129,6 +163,7 @@
|
||||
iso = (nixosConfigs."${hostname}" "iso").config.system.build.isoImage;
|
||||
vm_iso = (nixosConfigs."${hostname}" "vm_iso").config.system.build.isoImage;
|
||||
sd = (nixosConfigs."${hostname}" "sd").config.system.build.sdImage;
|
||||
installer = (installerConfig hostname nodes."${hostname}").config.system.build.isoImage;
|
||||
}) (nixpkgs.lib.attrsets.filterAttrs (hostname: nodeConfig: nodeConfig.system == system) nodes))
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user