summary refs log tree commit diff
path: root/nixos/modules/services
diff options
context:
space:
mode:
authorArseniy Seroka <jagajaga@users.noreply.github.com>2015-03-28 13:16:13 +0300
committerArseniy Seroka <jagajaga@users.noreply.github.com>2015-03-28 13:16:13 +0300
commita639c710aebe51b395154d7694547ccd1009426f (patch)
tree0ce432cdcebe60b3046d2057f6f15e5c34205302 /nixos/modules/services
parentc01313085809b56f3b3ef39699a206b4ede9294e (diff)
parent4cd43bd2aed32ec6127feb35b4d5c613ced24286 (diff)
downloadnixlib-a639c710aebe51b395154d7694547ccd1009426f.tar
nixlib-a639c710aebe51b395154d7694547ccd1009426f.tar.gz
nixlib-a639c710aebe51b395154d7694547ccd1009426f.tar.bz2
nixlib-a639c710aebe51b395154d7694547ccd1009426f.tar.lz
nixlib-a639c710aebe51b395154d7694547ccd1009426f.tar.xz
nixlib-a639c710aebe51b395154d7694547ccd1009426f.tar.zst
nixlib-a639c710aebe51b395154d7694547ccd1009426f.zip
Merge pull request #6968 from oxij/unquestionably-good
Easy to check to be unquestionably good changes
Diffstat (limited to 'nixos/modules/services')
-rw-r--r--nixos/modules/services/hardware/udev.nix1
-rw-r--r--nixos/modules/services/networking/ssh/sshd.nix13
2 files changed, 3 insertions, 11 deletions
diff --git a/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix
index 39180f4d37ec..a775aed0fdaa 100644
--- a/nixos/modules/services/hardware/udev.nix
+++ b/nixos/modules/services/hardware/udev.nix
@@ -28,6 +28,7 @@ let
   # Perform substitutions in all udev rules files.
   udevRules = stdenv.mkDerivation {
     name = "udev-rules";
+    preferLocalBuild = true;
     buildCommand = ''
       mkdir -p $out
       shopt -s nullglob
diff --git a/nixos/modules/services/networking/ssh/sshd.nix b/nixos/modules/services/networking/ssh/sshd.nix
index b11f996c63cf..b2740bd33b7f 100644
--- a/nixos/modules/services/networking/ssh/sshd.nix
+++ b/nixos/modules/services/networking/ssh/sshd.nix
@@ -9,12 +9,6 @@ let
 
   nssModulesPath = config.system.nssModules.path;
 
-  permitRootLoginCheck = v:
-    v == "yes" ||
-    v == "without-password" ||
-    v == "forced-commands-only" ||
-    v == "no";
-
   knownHosts = map (h: getAttr h cfg.knownHosts) (attrNames cfg.knownHosts);
 
   knownHostsText = flip (concatMapStringsSep "\n") knownHosts
@@ -116,12 +110,9 @@ in
 
       permitRootLogin = mkOption {
         default = "without-password";
-        type = types.addCheck types.str permitRootLoginCheck;
+        type = types.enum ["yes" "without-password" "forced-commands-only" "no"];
         description = ''
-          Whether the root user can login using ssh. Valid values are
-          <literal>yes</literal>, <literal>without-password</literal>,
-          <literal>forced-commands-only</literal> or
-          <literal>no</literal>.
+          Whether the root user can login using ssh.
         '';
       };