summaryrefslogtreecommitdiff
path: root/modules/desktop/security/pam.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/desktop/security/pam.nix')
-rw-r--r--modules/desktop/security/pam.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/modules/desktop/security/pam.nix b/modules/desktop/security/pam.nix
new file mode 100644
index 0000000..b7eb426
--- /dev/null
+++ b/modules/desktop/security/pam.nix
@@ -0,0 +1,50 @@
+{
+ security = {
+ pam = {
+ loginLimits = [
+ {
+ domain = "@wheel";
+ item = "nofile";
+ type = "soft";
+ value = "524288";
+ }
+ {
+ domain = "@wheel";
+ item = "nofile";
+ type = "hard";
+ value = "1048576";
+ }
+ ];
+
+ services =
+ let
+ ttyAudit = {
+ enable = true;
+ enablePattern = "*";
+ };
+ in
+ {
+ swaylock.text = "auth include login";
+ gtklock.text = "auth include login";
+
+ login = {
+ inherit ttyAudit;
+
+ setLoginUid = true;
+ };
+
+ sshd = {
+ inherit ttyAudit;
+
+ setLoginUid = true;
+ };
+
+ sudo = {
+ inherit ttyAudit;
+
+ setLoginUid = true;
+ };
+ };
+ };
+ };
+}