This commit is contained in:
Kiara Grouwstra 2025-08-25 00:45:30 +02:00
parent 11ce773862
commit 5ffd7f3940
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU

View file

@ -8,9 +8,7 @@ let
in in
{ {
_class = "nixosTest"; _class = "nixosTest";
name = "deployment-model"; name = "deployment-model";
sourceFileset = lib.fileset.unions [ sourceFileset = lib.fileset.unions [
../../data-model.nix ../../data-model.nix
../../function.nix ../../function.nix
@ -21,11 +19,9 @@ in
nodes.deployer = nodes.deployer =
{ pkgs, ... }: { pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
jq jq
]; ];
system.extraDependenciesFromModule = system.extraDependenciesFromModule =
{ pkgs, ... }: { pkgs, ... }:
{ {
@ -46,30 +42,22 @@ in
set -euo pipefail set -euo pipefail
# INSTANTIATE # INSTANTIATE
command=( command=(nix-instantiate --expr '
nix-instantiate
--expr
'
let let
configuration = { pkgs, config, ... }: { configuration = { pkgs, config, ... }: {
imports = [ imports = [
${pathToRoot}/deployment/check/common/sharedOptions.nix ${pathToRoot}/deployment/check/common/sharedOptions.nix
${pathToRoot}/deployment/check/common/targetNode.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;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
hello hello
]; ];
}; };
in in
import ${pathToRoot}/deployment/nixos.nix { inherit configuration; } import ${pathToRoot}/deployment/nixos.nix { inherit configuration; }
' ')
)
# DEPLOY # DEPLOY
host="root@${nodeName}" host="root@${nodeName}"
sshOpts=( sshOpts=(