summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hosts/phosphophyllite/default.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/hosts/phosphophyllite/default.nix b/hosts/phosphophyllite/default.nix
index b7acc31..903bbae 100644
--- a/hosts/phosphophyllite/default.nix
+++ b/hosts/phosphophyllite/default.nix
@@ -3,6 +3,14 @@
./hardware-configuration.nix
];
+ services.displayManager = {
+ defaultSession = "hyprland";
+ autoLogin = {
+ enable = true;
+ user = "phos";
+ };
+ };
+
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
@@ -22,6 +30,7 @@
services.sunshine = {
enable = true;
+ autoStart = true;
openFirewall = true;
capSysAdmin = true;
settings = {
@@ -41,6 +50,8 @@
};
};
+ systemd.user.services.sunshine.serviceConfig.ExecStartPre = "${pkgs.procps}/bin/pkill -x sunshine || true";
+
security.sudo.extraRules = [
{
users = [ "phos" ];
@@ -73,6 +84,16 @@
};
};
+ systemd.user.services.autolock-after-login = {
+ description = "Lock session shortly after autologin";
+ wantedBy = [ "graphical-session.target" ];
+ after = [ "graphical-session.target" ];
+ serviceConfig = {
+ Type = "oneshot";
+ ExecStart = "${pkgs.bash}/bin/bash -lc 'sleep 20; command -v serpantinum >/dev/null && serpantinum lock || true'";
+ };
+ };
+
systemd.timers.sunshine-poweroff = {
description = "Shutdown desktop 15 minutes after Sunshine disconnect";
timerConfig = {