pass vars separately

This commit is contained in:
Kiara Grouwstra 2025-04-12 11:33:59 +02:00
parent 265d79aeef
commit 553753218e
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU
4 changed files with 4 additions and 8 deletions

View file

@ -1,6 +1,5 @@
{ {
config, config,
lib,
... ...
}: }:
let let
@ -56,11 +55,6 @@ in
COMPRESS_OFFLINE = true; COMPRESS_OFFLINE = true;
LIBSASS_OUTPUT_STYLE = "compressed"; LIBSASS_OUTPUT_STYLE = "compressed";
}; };
environment = {
TF_VARS = lib.strings.toJSON {
ssh_private_key_file = config.age.secrets.panel-ssh-key.path;
};
};
secrets = { secrets = {
SECRET_KEY = config.age.secrets.panel-secret-key.path; SECRET_KEY = config.age.secrets.panel-secret-key.path;
}; };

View file

@ -13,5 +13,5 @@
pkgs.gnugrep # used in terraform-nixos pkgs.gnugrep # used in terraform-nixos
(import ../launch/tf.nix { inherit lib pkgs; }) (import ../launch/tf.nix { inherit lib pkgs; })
]; ];
TF_VARS = lib.strings.toJSON { }; SSH_PRIVATE_KEY_FILE = "";
} }

View file

@ -31,6 +31,7 @@ let
]; ];
REPO_DIR = import ../../launch/tf-env.nix { inherit lib pkgs; }; REPO_DIR = import ../../launch/tf-env.nix { inherit lib pkgs; };
LOGGING_DIR = "/var/log/${name}"; LOGGING_DIR = "/var/log/${name}";
SSH_PRIVATE_KEY_FILE = config.age.secrets.panel-ssh-key.path;
}; };
python-environment = pkgs.python3.withPackages ( python-environment = pkgs.python3.withPackages (

View file

@ -259,5 +259,6 @@ bin_path=env['BIN_PATH']
# to deploy this should be specified, for dev just use a relative path. # to deploy this should be specified, for dev just use a relative path.
repo_dir = env["REPO_DIR"] repo_dir = env["REPO_DIR"]
ENV_VARS = json.loads(env["TF_VARS"]) | { ENV_VARS = {
"ssh_private_key_file": env["SSH_PRIVATE_KEY_FILE"],
} }