set env var specific to deployed setting

This commit is contained in:
Kiara Grouwstra 2025-04-16 17:52:48 +02:00
parent 393e92ffe0
commit e4c1a77353
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU
2 changed files with 8 additions and 4 deletions

View file

@ -55,9 +55,9 @@ in
COMPRESS_OFFLINE = true;
LIBSASS_OUTPUT_STYLE = "compressed";
};
# environment = {
# SSH_PRIVATE_KEY_FILE = config.age.secrets.panel-ssh-key.path;
# };
environment = {
SSH_PRIVATE_KEY_FILE = config.age.secrets.panel-ssh-key.path;
};
secrets = {
SECRET_KEY = config.age.secrets.panel-secret-key.path;
};

View file

@ -130,6 +130,10 @@ in
Contents will be appended to the definitions in `settings`.
'';
};
environment = mkOption {
type = types.attrs;
default = {};
};
secrets = mkOption {
type = types.attrsOf types.path;
default = { };
@ -208,7 +212,7 @@ in
# - manipulation should be straightforward in both places; e.g. dumping secrets to a directory that is not git-tracked and adding values to an attrset otherwise
# - error detection and correction; it should be clear where and why one messed up so it can be fixed immediately
# We may also want to test the development environment in CI in order to make sure that we don't break it inadvertently, because misconfiguration due to multiplpe sources of truth wastes a lot of time.
inherit environment;
environment = environment // cfg.environment;
};
networking.firewall.allowedTCPPorts = [