nixos/modules/services/jellyfin/default.nix

35 lines
655 B
Nix
Raw Normal View History

2022-11-29 18:47:27 +01:00
# The Free Software Media System
{ config, lib, pkgs, ... }:
let
cfg = config.my.services.jellyfin;
domain = config.networking.domain;
port = 8096;
in
{
options.my.services.jellyfin = with lib; {
enable = mkEnableOption "Jellyfin Media Server";
};
config = lib.mkIf cfg.enable {
services.jellyfin = {
enable = true;
};
my.services.nginx.virtualHosts = [
{
2023-04-02 15:54:01 +02:00
subdomain = "media";
2022-11-29 18:47:27 +01:00
inherit port;
}
];
webapps.apps.jellyfin = {
dashboard = {
2023-04-02 15:54:01 +02:00
name = "Media";
2022-11-29 18:47:27 +01:00
category = "media";
icon = "film";
2023-04-02 15:54:01 +02:00
link = "https://media.${domain}";
2022-11-29 18:47:27 +01:00
};
};
};
}