diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2023-01-01 13:46:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-01 13:46:55 +0100 |
commit | 70dab2843f01e69b0a2c24f374efcf30dae275a7 (patch) | |
tree | dfba00594857f7a4553ddf4b4baafc540e19d3fd /nixos/modules/services | |
parent | 1ca08d4c638a89f2c82bec993f9ca4893faf3241 (diff) | |
parent | cb98e26aaff781ed48a1885e7a6423708fb564b8 (diff) |
Merge pull request #208168 from hercules-ci/lib-types-string-coercions
`types.path`: Do not allow lists of strings
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/misc/nix-daemon.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/system/self-deploy.nix | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 10db7cdfb33cc..9863cc8e574c8 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -42,7 +42,7 @@ let else if isDerivation v then toString v else if builtins.isPath v then toString v else if isString v then v - else if strings.isCoercibleToString v then toString v + else if strings.isConvertibleWithToString v then toString v else abort "The nix conf value: ${toPretty {} v} can not be encoded"; mkKeyValue = k: v: "${escape [ "=" ] k} = ${mkValueString v}"; diff --git a/nixos/modules/services/system/self-deploy.nix b/nixos/modules/services/system/self-deploy.nix index 9b1ebfd375229..16a793a42253c 100644 --- a/nixos/modules/services/system/self-deploy.nix +++ b/nixos/modules/services/system/self-deploy.nix @@ -18,7 +18,7 @@ let in lib.concatStrings (lib.mapAttrsToList toArg args); - isPathType = x: lib.strings.isCoercibleToString x && builtins.substring 0 1 (toString x) == "/"; + isPathType = x: lib.types.path.check x; in { |