aboutsummaryrefslogtreecommitdiff
path: root/nixos/modules/bcg.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/bcg.nix')
-rw-r--r--nixos/modules/bcg.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/bcg.nix b/nixos/modules/bcg.nix
index 3146c15..ea89e3a 100644
--- a/nixos/modules/bcg.nix
+++ b/nixos/modules/bcg.nix
@@ -146,14 +146,14 @@ in {
envConfig = cfg.environmentFiles != [];
finalConfig =
if envConfig
- then "$RUNTIME_DIRECTORY/bcg.config.yaml"
+ then "\${RUNTIME_DIRECTORY}/bcg.config.yaml"
else configFile;
in {
description = "BigClown Gateway";
wantedBy = ["multi-user.target"];
wants = ["network-online.target"] ++ lib.optional config.services.mosquitto.enable "mosquitto.service";
after = ["network-online.target"];
- preStart = ''
+ preStart = mkIf envConfig ''
umask 077
${pkgs.envsubst}/bin/envsubst -i "${configFile}" -o "${finalConfig}"
'';