diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-07-30 13:10:03 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-07-30 13:18:33 +0200 |
commit | 94ce6ec866a51ff8e520a1acc592f4de04b5759c (patch) | |
tree | 9784557cd09bceb51ed6fab70ad7cdc83d2c0d22 /nixos | |
parent | b1ba1689bdad74210fd46a9715d6681ab48157fd (diff) | |
download | nixlib-94ce6ec866a51ff8e520a1acc592f4de04b5759c.tar nixlib-94ce6ec866a51ff8e520a1acc592f4de04b5759c.tar.gz nixlib-94ce6ec866a51ff8e520a1acc592f4de04b5759c.tar.bz2 nixlib-94ce6ec866a51ff8e520a1acc592f4de04b5759c.tar.lz nixlib-94ce6ec866a51ff8e520a1acc592f4de04b5759c.tar.xz nixlib-94ce6ec866a51ff8e520a1acc592f4de04b5759c.tar.zst nixlib-94ce6ec866a51ff8e520a1acc592f4de04b5759c.zip |
Print a sensible error message if no device is specified for a filesystem
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/tasks/filesystems.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix index 4b189a801b2a..d00f479754ff 100644 --- a/nixos/modules/tasks/filesystems.nix +++ b/nixos/modules/tasks/filesystems.nix @@ -146,7 +146,9 @@ in # Filesystems. ${flip concatMapStrings fileSystems (fs: - (if fs.device != null then fs.device else "/dev/disk/by-label/${fs.label}") + (if fs.device != null then fs.device + else if fs.label != null then "/dev/disk/by-label/${fs.label}" + else throw "No device specified for mount point ‘${fs.mountPoint}’.") + " " + fs.mountPoint + " " + fs.fsType + " " + fs.options |