about summary refs log tree commit diff stats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sys/services/flatpak/default.nix8
-rw-r--r--sys/services/greetd/default.nix4
-rw-r--r--sys/services/logind/default.nix12
-rw-r--r--sys/users/default.nix31
4 files changed, 41 insertions, 14 deletions
diff --git a/sys/services/flatpak/default.nix b/sys/services/flatpak/default.nix
index 47f50b8..0cc6108 100644
--- a/sys/services/flatpak/default.nix
+++ b/sys/services/flatpak/default.nix
@@ -4,8 +4,8 @@
     device = "/srv/flatpak";
     options = ["bind"];
   };
-  #xdg.portal = {
-  #   enable = true;
-  #    extraPortals = [pkgs.xdg-desktop-portal-gtk];
-  #  };
+  xdg.portal = {
+    enable = true;
+    extraPortals = [pkgs.xdg-desktop-portal-gtk];
+  };
 }
diff --git a/sys/services/greetd/default.nix b/sys/services/greetd/default.nix
index 9b9d5f6..f94828f 100644
--- a/sys/services/greetd/default.nix
+++ b/sys/services/greetd/default.nix
@@ -4,10 +4,10 @@
     restart = true;
     settings = {
       default_session = {
-        command = "${pkgs.greetd.tuigreet}/bin/tuigreet --cmd Hyprland";
+        command = "${pkgs.tuigreet}/bin/tuigreet --cmd Hyprland";
       };
       sway_session = {
-        command = "${pkgs.greetd.tuigreet}/bin/tuigreetswayway";
+        command = "${pkgs.tuigreet}/bin/tuigreetswayway";
       };
     };
   };
diff --git a/sys/services/logind/default.nix b/sys/services/logind/default.nix
index a3dd040..b883bcb 100644
--- a/sys/services/logind/default.nix
+++ b/sys/services/logind/default.nix
@@ -1,10 +1,8 @@
 {...}: {
-  services.logind = {
-    lidSwitch = "suspend-then-hibernate";
-    extraConfig = ''
-      IdleAction=ignore
-      HandlePowerKey=hibernate
-      HandlePowerKeyLongPress=poweroff
-    '';
+  services.logind.settings.Login = {
+    HandleLidSwitch = "suspend-then-hibernate";
+    IdleAction = "ignore";
+    HandlePowerKey = "hibernate";
+    HandlePowerKeyLongPress = "poweroff";
   };
 }
diff --git a/sys/users/default.nix b/sys/users/default.nix
index a6f8877..b1ff018 100644
--- a/sys/users/default.nix
+++ b/sys/users/default.nix
@@ -11,8 +11,37 @@
       home = "/home/sils";
       shell = pkgs.zsh;
       initialHashedPassword = "$y$j9T$r4578Hy9jZHmUH9uSr9OI.$SuR2anRq7EJ1gUJ6vi9qYmZrhLP.o3O5643IG6r5Ap/";
-      extraGroups = ["wheel" "networkmanager" "video" "libvirtd"];
+      extraGroups = [
+        "wheel"
+        "networkmanager"
+        "video"
+        "libvirtd"
+        "realtime"
+      ];
     };
   };
+  services.udev.extraRules = ''
+    KERNEL=="cpu_dma_latency", GROUP="realtime"
+  '';
+  security.pam.loginLimits = [
+    {
+      domain = "@realtime";
+      type = "-";
+      item = "rtprio";
+      value = 98;
+    }
+    {
+      domain = "@realtime";
+      type = "-";
+      item = "memlock";
+      value = "unlimited";
+    }
+    {
+      domain = "@realtime";
+      type = "-";
+      item = "nice";
+      value = -11;
+    }
+  ];
   programs.zsh.enable = true;
 }