nixos/rust-motd: use existing PAM options to configure pam_motd
This commit is contained in:
parent
4019840563
commit
e2e240b5f1
@ -150,13 +150,10 @@ in
|
|||||||
wantedBy = [ "timers.target" ];
|
wantedBy = [ "timers.target" ];
|
||||||
timerConfig.OnCalendar = cfg.refreshInterval;
|
timerConfig.OnCalendar = cfg.refreshInterval;
|
||||||
};
|
};
|
||||||
security.pam.services.sshd.text = lib.mkIf cfg.enableMotdInSSHD (
|
|
||||||
lib.mkDefault (
|
security.pam.services.sshd.showMotd = lib.mkIf cfg.enableMotdInSSHD true;
|
||||||
lib.mkAfter ''
|
users.motdFile = lib.mkIf cfg.enableMotdInSSHD "/var/lib/rust-motd/motd";
|
||||||
session optional ${pkgs.pam}/lib/security/pam_motd.so motd=/var/lib/rust-motd/motd
|
|
||||||
''
|
|
||||||
)
|
|
||||||
);
|
|
||||||
services.openssh.extraConfig =
|
services.openssh.extraConfig =
|
||||||
lib.mkIf (cfg.settings ? last_login && cfg.settings.last_login != { })
|
lib.mkIf (cfg.settings ? last_login && cfg.settings.last_login != { })
|
||||||
''
|
''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user