nixos/clash: add file extension to secret

This commit is contained in:
Guanran Wang 2024-01-14 16:39:29 +08:00
parent 4f44b4d9d9
commit 6e1f921b05
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8

View file

@ -49,14 +49,14 @@ in {
ExecStart = builtins.concatStringsSep " " [
(lib.getExe cfg.package)
"-d /var/lib/private/clash"
(lib.optionalString (cfg.configFile != null) "-f \${CREDENTIALS_DIRECTORY}/configuration")
(lib.optionalString (cfg.configFile != null) "-f \${CREDENTIALS_DIRECTORY}/config.yaml")
(lib.optionalString (cfg.webui != null) "-ext-ui ${cfg.webui}")
(lib.optionalString (cfg.extraOpts != null) cfg.extraOpts)
];
DynamicUser = true;
StateDirectory = "clash";
LoadCredential = "configuration:${cfg.configFile}";
LoadCredential = "config.yaml:${cfg.configFile}";
### Hardening
CapabilityBoundingSet = "";