summaryrefslogtreecommitdiff
path: root/hosts/phosphophyllite
diff options
context:
space:
mode:
authoralex <[email protected]>2026-10-27 23:16:57 +0100
committeralex <[email protected]>2026-10-27 23:16:57 +0100
commit434be0ce45760ed116835aa7c2c1b543991a041c (patch)
treee264270c01831c6565c7394245c44f45953ff2fc /hosts/phosphophyllite
parent6c37fcef311c3164a6e394502102e6e488e8c065 (diff)
downloadnixos-434be0ce45760ed116835aa7c2c1b543991a041c.tar.xz
nixos-434be0ce45760ed116835aa7c2c1b543991a041c.zip
phos autologin
Diffstat (limited to 'hosts/phosphophyllite')
-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 = {