rename deployment method to prep for separation

Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
This commit is contained in:
Kiara Grouwstra 2025-10-21 15:09:15 +02:00
parent 299682884d
commit b8a1ce5b74
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU
9 changed files with 13 additions and 13 deletions

View file

@ -46,7 +46,7 @@ in
deployment-name,
}:
{
tf-proxmox-host = {
tf-proxmox-vm = {
nixos-configuration = mkNixosConfiguration environment required-resources;
system = targetSystem;
ssh = {

View file

@ -38,14 +38,14 @@ let
ipv6Gateway = "";
ipv6Address = "";
};
}).default.tf-proxmox-host;
}).default.tf-proxmox-vm;
in
{
_class = "nixosTest";
name = "deployment-model";
sourceFileset = lib.fileset.unions [
../../run/tf-proxmox/run.sh
../../run/tf-proxmox/await-ssh.sh
../../run/tf-proxmox-vm/run.sh
../../run/tf-proxmox-vm/await-ssh.sh
];
nodes.pve =
@ -114,7 +114,7 @@ in
pkgs.pve-manager
pkgs.openssl
pkgs.jq
(pkgs.callPackage ../../run/tf-proxmox/tf.nix { })
(pkgs.callPackage ../../run/tf-proxmox-vm/tf.nix { })
];
# needed only when building from deployer

View file

@ -284,7 +284,7 @@ let
};
});
};
tf-proxmox-host = mkOption {
tf-proxmox-vm = mkOption {
description = "A Terraform deployment by SSH to update a single existing NixOS host.";
type = submodule (tf-host: {
options = {
@ -395,7 +395,7 @@ let
key-file
sshOpts
;
deployment-type = "tf-proxmox-host";
deployment-type = "tf-proxmox-vm";
nixos_conf = writeConfig {
inherit
system
@ -464,10 +464,10 @@ let
};
tf-env = pkgs.callPackage ./run/tf-env.nix {
inherit httpBackend;
tfPackage = pkgs.callPackage ./run/tf-proxmox/tf.nix { };
tfPackage = pkgs.callPackage ./run/tf-proxmox-vm/tf.nix { };
tfDirs = [
"deployment/run/tf-single-host"
"deployment/run/tf-proxmox"
"deployment/run/tf-proxmox-vm"
];
};
vm_name = "test14";
@ -478,7 +478,7 @@ let
pkgs.qemu
pkgs.nixos-generators
pkgs.httpie
(pkgs.callPackage ./run/tf-proxmox/tf.nix { })
(pkgs.callPackage ./run/tf-proxmox-vm/tf.nix { })
])
''
set -e
@ -499,7 +499,7 @@ let
env ${toString (lib.mapAttrsToList (k: v: "TF_VAR_${k}=\"${toBash v}\"") environment)} \
${toString (lib.mapAttrsToList (k: v: "${k}=\"${toBash v}\"") httpBackend)} \
TF_VAR_image=/tmp/${name}.qcow2 \
tf_env=${tf-env} bash ./deployment/run/tf-proxmox/run.sh
tf_env=${tf-env} bash ./deployment/run/tf-proxmox-vm/run.sh
'';
# # don't really wanna deal with having to do versioned updates for now
# qemu-img convert -f raw -O qcow2 -C "${machine.config.system.build.image}/${name}.raw" /tmp/${name}.qcow2

View file

@ -5,7 +5,7 @@ declare tf_env
# # on upload explodes RAM use + logs file content, causing timeout
# export TF_LOG=debug
cd "${tf_env}/deployment/run/tf-proxmox"
cd "${tf_env}/deployment/run/tf-proxmox-vm"
# parallelism=1: limit OOM risk
TF_LOG=info tofu apply --auto-approve -input=false -parallelism=1 >&2
TF_LOG=error tofu output -json

View file

@ -110,7 +110,7 @@
# ipv6Address = "2a00:51c0:13:1305::${vm-id}";
};
# opt not to pass `inputs`, as we could only pass serializable arguments through to its self-call
})."tf-proxmox-deployment".tf-proxmox-host
})."tf-proxmox-deployment".tf-proxmox-vm
}
'';
in