nixos/systemd-lib: fix assertValueOneOf

when value is not a string
This commit is contained in:
Florian Jacob 2018-09-20 13:40:50 +02:00
parent 05659962cd
commit 4392ec653c

View File

@ -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}))