specialArgs: sources

This commit is contained in:
Kiara Grouwstra 2025-08-24 18:25:00 +02:00
parent 7d1f0c61af
commit ff8d29177f
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU

View file

@ -66,20 +66,20 @@ in
' '
let let
system = builtins.currentSystem; args = builtins.fromJSON "${
configuration = { pkgs, config, ... }: {
imports = [
${pathToRoot}/deployment/check/common/sharedOptions.nix
${pathToRoot}/deployment/check/common/targetNode.nix
];
_module.args = builtins.fromJSON "${
lib.replaceStrings [ "\"" ] [ "\\\\\"" ] ( lib.replaceStrings [ "\"" ] [ "\\\\\"" ] (
lib.strings.toJSON { lib.strings.toJSON {
inherit sources; inherit sources;
} }
) )
}"; }";
inherit (args) sources;
configuration = { pkgs, config, ... }: {
imports = [
${pathToRoot}/deployment/check/common/sharedOptions.nix
${pathToRoot}/deployment/check/common/targetNode.nix
];
enableAcme = ${lib.strings.toJSON config.enableAcme}; enableAcme = ${lib.strings.toJSON config.enableAcme};
acmeNodeIP = if config.enableAcme then config.nodes.acme.networking.primaryIPAddress else null; acmeNodeIP = if config.enableAcme then config.nodes.acme.networking.primaryIPAddress else null;
@ -89,7 +89,18 @@ in
autoconf autoconf
]; ];
}; };
os = import "${sources.nixpkgs}/nixos" { inherit system configuration; }; eval = import "${sources.nixpkgs}/nixos/lib/eval-config.nix" {
system = builtins.currentSystem;
specialArgs = {
inherit sources;
};
modules = [ configuration ];
};
os = {
inherit (eval) pkgs config options;
system = eval.config.system.build.toplevel;
inherit (eval.config.system.build) vm vmWithBootLoader;
};
in in
# import "${pathToRoot}/deployment/nixos.nix" {} # import "${pathToRoot}/deployment/nixos.nix" {}
{ {