From c0774b7595124342f205f7792cc156be2f1d6757 Mon Sep 17 00:00:00 2001 From: isabel Date: Mon, 11 Aug 2025 11:07:22 +0000 Subject: [PATCH] nix/appview: add enviroment file option --- nix/modules/appview.nix | 14 ++++++++++++++ 1 file(s) changed, 14 insertion(s)(+), 0 deletion(s)(-) diff --git a/nix/modules/appview.nix b/nix/modules/appview.nix --- a/nix/modules/appview.nix +++ b/nix/modules/appview.nix @@ -27,6 +27,19 @@ default = "00000000000000000000000000000000"; description = "Cookie secret"; }; + environmentFile = mkOption { + type = with types; nullOr path; + default = null; + example = "/etc/tangled-appview.env"; + description = '' + Additional environment file as defined in {manpage}`systemd.exec(5)`. + + Sensitive secrets such as {env}`TANGLED_COOKIE_SECRET` may be + passed to the service without makeing them world readable in the + nix store. + + ''; + }; }; }; @@ -39,6 +52,7 @@ ListenStream = "0.0.0.0:${toString cfg.port}"; ExecStart = "${cfg.package}/bin/appview"; Restart = "always"; + EnvironmentFile = optional (cfg.environmentFile != null) cfg.environmentFile; }; environment = { -- tangled.sh