diff --git a/common/icons/jellyfin.png b/common/icons/jellyfin.png new file mode 100644 index 0000000..7b8293a Binary files /dev/null and b/common/icons/jellyfin.png differ diff --git a/hosts/nixos/lapetus/default.nix b/hosts/nixos/lapetus/default.nix index e5910bd..9b5dba9 100644 --- a/hosts/nixos/lapetus/default.nix +++ b/hosts/nixos/lapetus/default.nix @@ -21,6 +21,7 @@ ./services/radicale.nix ./services/ddclient.nix ./services/redlib.nix + ./services/jellyfin.nix ./filesystems ./hardware ]; diff --git a/hosts/nixos/lapetus/services/homer.nix b/hosts/nixos/lapetus/services/homer.nix index d9ba6cb..20b5ea9 100644 --- a/hosts/nixos/lapetus/services/homer.nix +++ b/hosts/nixos/lapetus/services/homer.nix @@ -144,6 +144,12 @@ in logo = icon "commafeed.png"; url = "https://rss.moonythm.dev"; } + { + name = "Jellyfin"; + subtitle = "Media server"; + logo = icon "jellyfin.png"; + url = "https://media.moonythm.dev"; + } ]; } # }}} diff --git a/hosts/nixos/lapetus/services/jellyfin.nix b/hosts/nixos/lapetus/services/jellyfin.nix new file mode 100644 index 0000000..60bd844 --- /dev/null +++ b/hosts/nixos/lapetus/services/jellyfin.nix @@ -0,0 +1,24 @@ +{ config, pkgs, ... }: { + imports = [ ../../common/optional/services/nginx.nix ]; + + services.nginx.virtualHosts."media.moonythm.dev" = + config.satellite.proxy 8096 { }; # This is the default port, and can only be changed via the GUI + + services.jellyfin.enable = true; + + # {{{ Storage + environment.persistence."/persist/state".directories = [{ + directory = "/var/lib/jellyfin"; + mode = "u=rwx,g=r,o=r"; + user = config.services.jellyfin.user; + group = config.services.jellyfin.group; + }]; + + environment.persistence."/persist/local/cache".directories = [{ + directory = "/var/cache/jellyfin"; + mode = "u=rwx,g=,o="; + user = config.services.jellyfin.user; + group = config.services.jellyfin.group; + }]; + # }}} +}