From 7a0c1728acd7d7f5d86a2721e6c5ed1188463597 Mon Sep 17 00:00:00 2001 From: jakobrs Date: Fri, 18 Jun 2021 08:32:45 +0200 Subject: nixos/lib: Handle null `device` correctly --- nixos/lib/utils.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos') diff --git a/nixos/lib/utils.nix b/nixos/lib/utils.nix index 1a51b149e56e..f1332ab55930 100644 --- a/nixos/lib/utils.nix +++ b/nixos/lib/utils.nix @@ -27,7 +27,7 @@ rec { # *not* a parent of b.device. If we add a slash at the end of each string, # though, this is not a problem: "/aaa/" is not a prefix of "/aaaa/". normalisePath = path: "${path}${optionalString (!(hasSuffix "/" path)) "/"}"; - normalise = mount: mount // { device = normalisePath mount.device; + normalise = mount: mount // { device = normalisePath (toString mount.device); mountPoint = normalisePath mount.mountPoint; depends = map normalisePath mount.depends; }; -- cgit 1.4.1