don't check canonicalized paths while sandboxed

Because the configured paths won't exist in the sandbox, so
canonicalization would fail.
This commit is contained in:
Charles Hall 2025-03-21 15:22:14 -07:00
parent 50583bc93e
commit a04951541a
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
5 changed files with 30 additions and 19 deletions

View file

@ -12,7 +12,7 @@ let
cfg = config.services.grapevine;
configFile = format.generate "config.toml" cfg.settings;
validateConfig = file: pkgs.runCommand "grapevine-checked-config" {} ''
${lib.getExe cfg.package} check-config -c ${lib.escapeShellArg file}
${lib.getExe cfg.package} check-config -sc ${lib.escapeShellArg file}
ln -s ${lib.escapeShellArg file} "$out"
'';
format = pkgs.formats.toml {};