nixos-configs/devices/nos/modules/jellyfin/default.nix
matt1432 25ab7c3b2d
All checks were successful
Discord / discord commits (push) Successful in 45s
feat(servers): add first config for jellyfin
2024-03-01 21:36:57 -05:00

33 lines
584 B
Nix

{
config,
lib,
...
}: let
inherit (lib) hasAttr fileContents optionals;
inherit (config.vars) mainUser;
optionalGroup = name:
optionals
(hasAttr name config.users.groups)
[config.users.groups.${name}.name];
in {
imports = [
./jfa-go.nix
./packages.nix
];
users.users."jellyfin".extraGroups =
optionalGroup mainUser
++ optionalGroup "input"
++ optionalGroup "media"
++ optionalGroup "render";
services = {
jellyfin.enable = true;
nginx = {
enable = true;
config = fileContents ./nginx.conf;
};
};
}