chore(flake): add environmentFiles in options (#21131)

This commit is contained in:
Vonfry 2026-02-13 16:09:12 +08:00 committed by GitHub
parent 91ff6e28df
commit 1b9eccb19e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 1 deletions

View File

@ -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";