From 1b9eccb19e034f88d82bc68e7b64c89433d0bd5a Mon Sep 17 00:00:00 2001 From: Vonfry Date: Fri, 13 Feb 2026 16:09:12 +0800 Subject: [PATCH] chore(flake): add environmentFiles in options (#21131) --- flake.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 0ecedb3e0..439b0035d 100644 --- a/flake.nix +++ b/flake.nix @@ -166,6 +166,19 @@ ''; }; + environmentFiles = mkOption { + type = types.listOf types.path; + default = [ ]; + example = literalExpression '' + [ config.sops.secrets.rsshub.path ] + ''; + description = '' + Environment variables stored in files for RSSHub. + It can be used for secrets like agenix, sops-nix, etc. + See https://docs.rsshub.app/deploy/config for available options. + ''; + }; + redis = { enable = mkOption { type = types.bool; @@ -238,7 +251,7 @@ User = cfg.user; Group = cfg.group; WorkingDirectory = cfg.dataDir; - EnvironmentFile = environmentFile; + EnvironmentFile = [environmentFile] ++ cfg.environmentFiles; ExecStart = "${cfg.package}/bin/rsshub"; Restart = "on-failure"; RestartSec = "5s";