Bruno BELANYI
9446651944
This makes use of the 'media' group, to allow using the same group for any software that would either read or write to my media collection.
28 lines
605 B
Nix
28 lines
605 B
Nix
# A FLOSS media server
|
|
{ config, lib, ... }:
|
|
let
|
|
cfg = config.my.services.jellyfin;
|
|
domain = config.networking.domain;
|
|
jellyfinDomain = "jellyfin.${config.networking.domain}";
|
|
in
|
|
{
|
|
options.my.services.jellyfin = {
|
|
enable = lib.mkEnableOption "Jellyfin Media Server";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.jellyfin = {
|
|
enable = true;
|
|
group = "media";
|
|
};
|
|
|
|
# Proxy to Jellyfin
|
|
services.nginx.virtualHosts."${jellyfinDomain}" = {
|
|
forceSSL = true;
|
|
useACMEHost = "${domain}";
|
|
|
|
locations."/".proxyPass = "http://localhost:8096/";
|
|
};
|
|
};
|
|
}
|