mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 14:10:33 +03:00
nixos/rust-motd: use existing PAM options to configure pam_motd
This commit is contained in:
parent
4019840563
commit
e2e240b5f1
1 changed files with 4 additions and 7 deletions
|
@ -150,13 +150,10 @@ in
|
|||
wantedBy = [ "timers.target" ];
|
||||
timerConfig.OnCalendar = cfg.refreshInterval;
|
||||
};
|
||||
security.pam.services.sshd.text = lib.mkIf cfg.enableMotdInSSHD (
|
||||
lib.mkDefault (
|
||||
lib.mkAfter ''
|
||||
session optional ${pkgs.pam}/lib/security/pam_motd.so motd=/var/lib/rust-motd/motd
|
||||
''
|
||||
)
|
||||
);
|
||||
|
||||
security.pam.services.sshd.showMotd = lib.mkIf cfg.enableMotdInSSHD true;
|
||||
users.motdFile = lib.mkIf cfg.enableMotdInSSHD "/var/lib/rust-motd/motd";
|
||||
|
||||
services.openssh.extraConfig =
|
||||
lib.mkIf (cfg.settings ? last_login && cfg.settings.last_login != { })
|
||||
''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue