diff --git a/hosts/artemis/default.nix b/hosts/artemis/default.nix index b4cae3c..42ec41d 100644 --- a/hosts/artemis/default.nix +++ b/hosts/artemis/default.nix @@ -102,7 +102,7 @@ in }; desktop = { gnome.enable = lib.mkForce false; - hyprland.enable = true; + hyprland.enable = false; }; }; }; diff --git a/users/guest/common/optional/graphical/jellyfin.nix b/users/guest/common/optional/graphical/jellyfin.nix index 0d29dc3..941c2c4 100644 --- a/users/guest/common/optional/graphical/jellyfin.nix +++ b/users/guest/common/optional/graphical/jellyfin.nix @@ -17,24 +17,4 @@ ".local/share/jellyfinmediaplayer" ".local/share/Jellyfin Media Player" ]; - - systemd.user.services.jellyfin-media-player = { - Unit = { - Description = "Jellyfin Media Player in Gamescope"; - After = [ - "graphical.target" - "default.target" - ]; - }; - Service = { - ExecStart = '' - ${pkgs.gamescope}/bin/gamescope --hdr-enabled --rt --backend drm -- \ - ${pkgs.jellyfin-media-player}/bin/jellyfinmediaplayer --scale-factor 2 --tv --fullscreen - ''; - Restart = "always"; - }; - Install = { - WantedBy = [ "default.target" ]; - }; - }; } diff --git a/users/guest/common/optional/graphical/steam.nix b/users/guest/common/optional/graphical/steam.nix index b62220d..c25a850 100644 --- a/users/guest/common/optional/graphical/steam.nix +++ b/users/guest/common/optional/graphical/steam.nix @@ -14,21 +14,4 @@ ".local/share/vulkan" ".steam" ]; - - systemd.user.services.steam-big-picture = { - Unit = { - Description = "Steam Big Picture in Gamescope"; - After = [ - "graphical.target" - "default.target" - ]; - }; - Service = { - ExecStart = '' - ${pkgs.gamescope}/bin/gamescope --rt --backend drm --steam -- \ - ${pkgs.steam}/bin/steam -pipewire-dmabuf -tenfoot - ''; - Restart = "always"; - }; - }; } diff --git a/users/guest/default.nix b/users/guest/default.nix index 88a5284..1f35278 100644 --- a/users/guest/default.nix +++ b/users/guest/default.nix @@ -22,6 +22,7 @@ in ]; group = "users"; isNormalUser = true; + password = ""; shell = pkgs.zsh; }; @@ -64,11 +65,80 @@ in xdg.enable = true; }; - services.getty = { - autologinOnce = true; - autologinUser = "guest"; + services.displayManager = { + enable = true; + sessionPackages = + let + steamDesktopFile = pkgs.writeTextFile { + name = "steam-desktop-entry"; + destination = "/share/wayland-sessions/steam.desktop"; + text = '' + [Desktop Entry] + Name=steam + Comment=Desktop session for gaming + Exec=${pkgs.gamescope}/bin/gamescope --rt --backend drm --steam -- ${pkgs.steam}/bin/steam -pipewire-dmabuf -tenfoot + Type=Application + ''; + }; + + jellyfinDesktopFile = pkgs.writeTextFile { + name = "jellyfin-desktop-entry"; + destination = "/share/wayland-sessions/jellyfin.desktop"; + text = '' + [Desktop Entry] + Name=jellyfin + Comment=Desktop session for music, movies, and TV + Exec=${pkgs.gamescope}/bin/gamescope --rt --backend drm -- ${pkgs.jellyfin-media-player}/bin/jellyfinmediaplayer --scale-factor 2 --tv --fullscreen + Type=Application + ''; + }; + + steamSession = pkgs.symlinkJoin { + name = "steam-session"; + paths = [ steamDesktopFile ]; + passthru.providedSessions = [ "steam" ]; + }; + + jellyfinSession = pkgs.symlinkJoin { + name = "jellyfin-session"; + paths = [ jellyfinDesktopFile ]; + passthru.providedSessions = [ "jellyfin " ]; + }; + in + [ + steamSession + jellyfinSession + ]; }; + services.greetd = + let + desktops = config.services.displayManager.sessionData.desktops; + in + { + enable = true; + settings = { + default_session = { + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --sessions ${desktops}/share/xsessions:${desktops}/share/wayland-sessions"; + }; + }; + }; + + # security.pam.services = { + # greetd.text = '' + # auth requisite pam_nologin.so + # auth sufficient pam_succeed_if.so user = ${name} quiet_success + # auth required pam_unix.so + # + # account sufficient pam_unix.so + # + # password required pam_deny.so + # + # session optional pam_keyinit.so revoke + # session include login + # ''; + # }; + # Workaround: https://github.com/nix-community/home-manager/issues/7166 systemd.services."home-manager-${name}".serviceConfig = { RemainAfterExit = "yes";