From f8dd9b73f528e22ddaff1996f0138dcee3fce5b6 Mon Sep 17 00:00:00 2001 From: Jordan Holt Date: Sun, 28 Sep 2025 21:48:16 +0100 Subject: [PATCH] users/guest: add jellyfin-media-player user unit --- .../common/optional/graphical/jellyfin.nix | 31 +++++++++++++++++++ users/guest/default.nix | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 users/guest/common/optional/graphical/jellyfin.nix diff --git a/users/guest/common/optional/graphical/jellyfin.nix b/users/guest/common/optional/graphical/jellyfin.nix new file mode 100644 index 0000000..b6ff65f --- /dev/null +++ b/users/guest/common/optional/graphical/jellyfin.nix @@ -0,0 +1,31 @@ +{ + pkgs, + ... +}: +{ + home.packages = with pkgs; [ + gamescope + jellyfin-media-player + ]; + + home.persistence."/persist".directories = [ + ".config/jellyfin.org" + ]; + + systemd.user.services.jellyfin-media-player = { + Unit = { + Description = "Jellyfin Media Player in Gamescope"; + After = [ + "graphical.target" + "default.target" + ]; + }; + Service = { + ExecStart = '' + ${pkgs.gamescope}/bin/gamescope --rt --backend drm -- \ + ${pkgs.jellyfin-media-player}/bin/jellyfinmediaplayer --tv --scale-factor 2 + ''; + Restart = "always"; + }; + }; +} diff --git a/users/guest/default.nix b/users/guest/default.nix index 2c8bf75..2433161 100644 --- a/users/guest/default.nix +++ b/users/guest/default.nix @@ -27,6 +27,7 @@ in home-manager.users.${name} = { imports = [ + ./common/optional/graphical/jellyfin.nix ./common/optional/graphical/steam.nix { home.persistence."/state" = { @@ -36,7 +37,6 @@ in }; home.persistence."/persist" = { directories = [ - ".config/jellyfin.org" ".local/share/icons" ]; };