diff --git a/modules/module-list.nix b/modules/module-list.nix index 8c22e92b6ad..8e12fd14129 100644 --- a/modules/module-list.nix +++ b/modules/module-list.nix @@ -29,7 +29,7 @@ ./programs/bash/bash.nix ./programs/blcr.nix ./programs/info.nix - ./programs/pwdutils/pwdutils.nix + ./programs/shadow.nix ./programs/ssh.nix ./programs/ssmtp.nix ./rename.nix diff --git a/modules/programs/pwdutils/login.defs b/modules/programs/pwdutils/login.defs deleted file mode 100644 index 9d789fe7805..00000000000 --- a/modules/programs/pwdutils/login.defs +++ /dev/null @@ -1,18 +0,0 @@ -DEFAULT_HOME yes - -SYS_UID_MIN 100 -SYS_UID_MAX 499 -UID_MIN 1000 -UID_MAX 29999 - -SYS_GID_MIN 100 -SYS_GID_MAX 499 -GID_MIN 1000 -GID_MAX 29999 - -TTYGROUP tty -TTYPERM 0620 - -# Uncomment this to allow non-root users to change their account -#information. This should be made configurable. -#CHFN_RESTRICT frwh diff --git a/modules/programs/pwdutils/pwdutils.nix b/modules/programs/shadow.nix similarity index 80% rename from modules/programs/pwdutils/pwdutils.nix rename to modules/programs/shadow.nix index cb77a0e4346..711156918df 100644 --- a/modules/programs/pwdutils/pwdutils.nix +++ b/modules/programs/shadow.nix @@ -4,6 +4,28 @@ let + loginDefs = + '' + DEFAULT_HOME yes + + SYS_UID_MIN 100 + SYS_UID_MAX 499 + UID_MIN 1000 + UID_MAX 29999 + + SYS_GID_MIN 100 + SYS_GID_MAX 499 + GID_MIN 1000 + GID_MAX 29999 + + TTYGROUP tty + TTYPERM 0620 + + # Uncomment this to allow non-root users to change their account + #information. This should be made configurable. + #CHFN_RESTRICT frwh + ''; + in { @@ -35,7 +57,7 @@ in environment.etc = [ { # /etc/login.defs: global configuration for pwdutils. You # cannot login without it! - source = ./login.defs; + source = pkgs.writeText "login.defs" loginDefs; target = "login.defs"; }