Skip to content

Commit

Permalink
nixos/pam: add defaults option
Browse files Browse the repository at this point in the history
Changing all PAM configuration files derived from the default in pam.nix was impossible from outside the module.
  • Loading branch information
hyperfekt authored and hyperfekt committed May 12, 2019
1 parent ffc604e commit 769f80e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions nixos/modules/security/pam.nix
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,11 @@ let
"session optional ${pkgs.gnome3.gnome-keyring}/lib/security/pam_gnome_keyring.so auto_start"}
${optionalString (config.virtualisation.lxc.lxcfs.enable)
"session optional ${pkgs.lxc}/lib/security/pam_cgfs.so -c all"}
${optionalString (config.security.pam.defaults != null) ''
# Lines appended via security.pam.defaults.
${config.security.pam.defaults}
''}
'');
};

Expand Down Expand Up @@ -635,6 +640,12 @@ in
description = "Message of the day shown to users when they log in.";
};

security.pam.defaults = mkOption {
default = null;
type = types.nullOr types.lines;
description = "Lines to append to the default PAM configuration file.";
};

};


Expand Down

0 comments on commit 769f80e

Please sign in to comment.