add jellyfin to ymir

This commit is contained in:
Osman Faruk Bayram 2025-02-07 15:49:45 +03:00
parent 3c39b49b0e
commit 5d37ced152
3 changed files with 31 additions and 4 deletions

View file

@ -7,6 +7,7 @@
./fonts.nix
./graphical-interface.nix
./i18n.nix
./jellyfin.nix
./nix-settings.nix
./secrets.nix
./tailscale.nix

29
modules/jellyfin.nix Normal file
View file

@ -0,0 +1,29 @@
{
config,
pkgs,
...
}: {
options = {
myModules.enableJellyfin = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable Jellyfin media server";
};
};
};
config = lib.mkMerge [
(lib.mkIf config.myModules.enableJellyfin {
services.jellyfin = {
enable = true;
openFirewall = true;
};
networking.firewall.allowedTCPPorts = [8096];
})
];
}