nixos: add support for mkhomedir in PAM
This commit is contained in:
parent
ef22c53905
commit
8f50d803ef
@ -126,6 +126,16 @@ let
|
|||||||
description = "Whether to show the message of the day.";
|
description = "Whether to show the message of the day.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
makeHomeDir = mkOption {
|
||||||
|
default = false;
|
||||||
|
type = types.bool;
|
||||||
|
description = ''
|
||||||
|
Whether to try to create home directories for users
|
||||||
|
with <literal>$HOME</literal>s pointing to nonexistent
|
||||||
|
locations on session login.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
updateWtmp = mkOption {
|
updateWtmp = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
@ -192,6 +202,8 @@ let
|
|||||||
"session ${
|
"session ${
|
||||||
if config.boot.isContainer then "optional" else "required"
|
if config.boot.isContainer then "optional" else "required"
|
||||||
} pam_loginuid.so"}
|
} pam_loginuid.so"}
|
||||||
|
${optionalString cfg.makeHomeDir
|
||||||
|
"session required ${pkgs.pam}/lib/security/pam_mkhomedir.so silent skel=/etc/skel umask=0022"}
|
||||||
${optionalString cfg.updateWtmp
|
${optionalString cfg.updateWtmp
|
||||||
"session required ${pkgs.pam}/lib/security/pam_lastlog.so silent"}
|
"session required ${pkgs.pam}/lib/security/pam_lastlog.so silent"}
|
||||||
${optionalString config.users.ldap.enable
|
${optionalString config.users.ldap.enable
|
||||||
|
Loading…
x
Reference in New Issue
Block a user