nixos/systemd-lib: fix assertValueOneOf
when value is not a string
This commit is contained in:
parent
05659962cd
commit
4392ec653c
@ -63,7 +63,7 @@ in rec {
|
||||
|
||||
assertValueOneOf = name: values: group: attr:
|
||||
optional (attr ? ${name} && !elem attr.${name} values)
|
||||
"Systemd ${group} field `${name}' cannot have value `${attr.${name}}'.";
|
||||
"Systemd ${group} field `${name}' cannot have value `${toString attr.${name}}'.";
|
||||
|
||||
assertHasField = name: group: attr:
|
||||
optional (!(attr ? ${name}))
|
||||
|
Loading…
Reference in New Issue
Block a user