local vars

This commit is contained in:
Kiara Grouwstra 2025-04-12 10:27:11 +02:00
parent 1a8d940a90
commit 265d79aeef
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU
3 changed files with 11 additions and 3 deletions

View file

@ -1,5 +1,6 @@
{ {
config, config,
lib,
... ...
}: }:
let let
@ -54,10 +55,12 @@ in
CSRF_TRUSTED_ORIGINS = [ "https://${cfg.domain}" ]; CSRF_TRUSTED_ORIGINS = [ "https://${cfg.domain}" ];
COMPRESS_OFFLINE = true; COMPRESS_OFFLINE = true;
LIBSASS_OUTPUT_STYLE = "compressed"; LIBSASS_OUTPUT_STYLE = "compressed";
ENV_VARS = {
ssh_private_key_file = config.age.secrets.panel-ssh-key.path;
};
}; };
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,4 +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 { };
} }

View file

@ -14,6 +14,7 @@ import re
import sys import sys
import subprocess import subprocess
import os import os
import json
import importlib.util import importlib.util
import dj_database_url import dj_database_url
@ -257,3 +258,6 @@ bin_path=env['BIN_PATH']
# path of the root flake to trigger nixops from, see #94. # path of the root flake to trigger nixops from, see #94.
# 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"]) | {
}