nixos/usbguard: don't use path literal for pure evaluation

PR#256295 reintroduced ruleFile option, but set the default as a path
literal, which was a "string path" previously.  This breaks evaluation
for being impure:

  error: access to absolute path '/var/lib/usbguard/rules.conf' is forbidden in pure eval mode (use '--impure' to override)
This commit is contained in:
Andreas Wiese 2023-09-27 11:22:09 +02:00
parent 0dd3452970
commit 1e8b8e6d38

View File

@ -51,8 +51,8 @@ in
ruleFile = mkOption {
type = types.nullOr types.path;
default = /var/lib/usbguard/rules.conf;
example = /run/secrets/usbguard-rules;
default = "/var/lib/usbguard/rules.conf";
example = "/run/secrets/usbguard-rules";
description = lib.mdDoc ''
This tells the USBGuard daemon which file to load as policy rule set.