adding jellyfin
This commit is contained in:
41
modules/homelab/services/jellyfin/default.nix
Normal file
41
modules/homelab/services/jellyfin/default.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.modules.services.jellyfin;
|
||||
in
|
||||
{
|
||||
options.modules.system.docker = {
|
||||
enable = lib.mkEnableOption "enables jellyfin";
|
||||
# extra options
|
||||
# mode = lib.mkOption {
|
||||
# type = lib.types.enum [ "server" "client" ];
|
||||
# default = "client";
|
||||
# description = "whether syncthing should run as a client (user) or server (system-wide).";
|
||||
# };
|
||||
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
# declare jellyfin group
|
||||
users.groups.jellyfin = { gid = 701; };
|
||||
# declare jellyfin user
|
||||
users.users.jellyfin = {
|
||||
description = "jellyfin media server user";
|
||||
uid = 701;
|
||||
isSystemUser = true;
|
||||
home = "/var/lib/jellyfin";
|
||||
createHome = true;
|
||||
group = "jellyfin";
|
||||
extraGroups = [ "media" "video" "render" ];
|
||||
};
|
||||
|
||||
services.jellyfin = {
|
||||
enable = true;
|
||||
openFirewall = true; # Opens 8096/8920 automatically
|
||||
user = "jellyfin"; # Default: jellyfin
|
||||
group = "jellyfin"; # Default: jellyfin
|
||||
dataDir = "/var/lib/jellyfin"; # Config + metadata storage
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user