summary refs log tree commit diff
path: root/nixos/lib/utils.nix
diff options
context:
space:
mode:
authorjakobrs <jakobrs100@gmail.com>2021-06-18 08:32:45 +0200
committerjakobrs <jakobrs100@gmail.com>2021-06-18 08:32:45 +0200
commit7a0c1728acd7d7f5d86a2721e6c5ed1188463597 (patch)
treefb341f4cc7ddb381b16f3f85b79249cbaec6ad58 /nixos/lib/utils.nix
parentea34fe21e18f87dc8b333672f23edf2bcee98cd7 (diff)
downloadnixpkgs-7a0c1728acd7d7f5d86a2721e6c5ed1188463597.tar
nixpkgs-7a0c1728acd7d7f5d86a2721e6c5ed1188463597.tar.gz
nixpkgs-7a0c1728acd7d7f5d86a2721e6c5ed1188463597.tar.bz2
nixpkgs-7a0c1728acd7d7f5d86a2721e6c5ed1188463597.tar.lz
nixpkgs-7a0c1728acd7d7f5d86a2721e6c5ed1188463597.tar.xz
nixpkgs-7a0c1728acd7d7f5d86a2721e6c5ed1188463597.tar.zst
nixpkgs-7a0c1728acd7d7f5d86a2721e6c5ed1188463597.zip
nixos/lib: Handle null `device` correctly
Diffstat (limited to 'nixos/lib/utils.nix')
-rw-r--r--nixos/lib/utils.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/lib/utils.nix b/nixos/lib/utils.nix
index 1a51b149e56..f1332ab5593 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;
                                   };