From 2dc04551477b220605a43337d05b69d20d1fe5fc Mon Sep 17 00:00:00 2001 From: Lorwp Date: Tue, 21 Jan 2025 10:52:21 +1100 Subject: [PATCH] Add EnvironmentFile option to nix package --- build/package/nix/tgstation-server.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build/package/nix/tgstation-server.nix b/build/package/nix/tgstation-server.nix index 0cd74937ef..b1d80d2bba 100644 --- a/build/package/nix/tgstation-server.nix +++ b/build/package/nix/tgstation-server.nix @@ -91,6 +91,14 @@ in Extra PATH entries to add to the TGS process ''; }; + + environmentFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; + default = null; + description = '' + Environment file as defined in {manpage}`systemd.exec(5)` + ''; + }; }; }; @@ -126,6 +134,7 @@ in description = "tgstation-server"; reloadTriggers = cfg.production-appsettings; serviceConfig = { + EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile; User = cfg.username; Type = "notify-reload"; NotifyAccess = "all";