diff --git a/nixos/lib/utils.nix b/nixos/lib/utils.nix index 871fbb121d0..40d0854d968 100644 --- a/nixos/lib/utils.nix +++ b/nixos/lib/utils.nix @@ -12,6 +12,8 @@ rec { toShellPath = shell: if types.shellPackage.check shell then "/run/current-system/sw${shell.shellPath}" + else if types.package.check shell then + throw "${shell} is not a shell package" else shell; } diff --git a/pkgs/os-specific/linux/shadow/default.nix b/pkgs/os-specific/linux/shadow/default.nix index 7f0d40f6be1..ec3e9b14d2a 100644 --- a/pkgs/os-specific/linux/shadow/default.nix +++ b/pkgs/os-specific/linux/shadow/default.nix @@ -53,8 +53,9 @@ stdenv.mkDerivation rec { meta = { homepage = http://pkg-shadow.alioth.debian.org/; description = "Suite containing authentication-related tools such as passwd and su"; - passthru = { - shellPath = "/bin/nologin"; - }; + }; + + passthru = { + shellPath = "/bin/nologin"; }; }