rm optional from deployer

Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
This commit is contained in:
Kiara Grouwstra 2025-10-23 15:41:27 +02:00
parent 8e17e8bc9b
commit 9ac85993e0
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU
2 changed files with 14 additions and 15 deletions

View file

@ -74,20 +74,18 @@ in
## configuration and the store paths needed to build it and ## configuration and the store paths needed to build it and
## dump them in `system.extraDependencies`. ## dump them in `system.extraDependencies`.
machine = machine =
(pkgs.nixos ( (pkgs.nixos [
[ ./targetNode.nix
./targetNode.nix # ../../../infra/common/nixos/repart.nix
# ../../../infra/common/nixos/repart.nix "${modulesPath}/../lib/testing/nixos-test-base.nix"
config.system.extraDependenciesFromModule config.system.extraDependenciesFromModule
{ {
nixpkgs.hostPlatform = "x86_64-linux"; nixpkgs.hostPlatform = "x86_64-linux";
_module.args = { inherit inputs sources; }; _module.args = { inherit inputs sources; };
enableAcme = config.enableAcme; enableAcme = config.enableAcme;
acmeNodeIP = config.acmeNodeIP; acmeNodeIP = config.acmeNodeIP;
} }
] ]).config;
++ (lib.optional config.useFlake "${modulesPath}/../lib/testing/nixos-test-base.nix")
)).config;
in in
[ [

View file

@ -4,6 +4,7 @@
config, config,
hostPkgs, hostPkgs,
sources, sources,
modulesPath,
... ...
}: }:
@ -112,7 +113,7 @@ in
(genAttrs config.targetMachines (_: { (genAttrs config.targetMachines (_: {
imports = [ imports = [
./targetNode.nix ./targetNode.nix
] ++ (lib.optional config.useFlake "${sources.nixpkgs}/nixos/lib/testing/nixos-test-base.nix"); ] ++ (lib.optional config.useFlake "${modulesPath}/../lib/testing/nixos-test-base.nix");
_module.args = { inherit inputs sources; }; _module.args = { inherit inputs sources; };
enableAcme = config.enableAcme; enableAcme = 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;