nixos/hosts/architect/jellyfin.nix

46 lines
1000 B
Nix
Raw Permalink Normal View History

2021-07-13 09:53:22 +01:00
{ pkgs, ... }:
2022-02-15 10:58:08 +00:00
let
network = import ./network.nix;
domain = "jellyfin.giugl.io";
in {
2021-11-25 11:42:32 +00:00
disabledModules = [ "services/misc/jellyfin.nix" ];
imports = [ ./modules/jellyfin.nix ];
2021-07-07 13:13:19 +01:00
services = {
jellyfin = {
2021-11-25 11:42:32 +00:00
enable = true;
2022-03-15 15:58:04 +00:00
group = "media";
2021-11-25 11:42:32 +00:00
package = pkgs.unstable.jellyfin;
};
2021-07-07 13:13:19 +01:00
2022-02-15 10:58:08 +00:00
nginx.virtualHosts.${domain} = {
# forceSSL = true;
# enableACME = true;
2021-07-07 13:13:19 +01:00
locations."/" = {
proxyPass = "http://localhost:8096";
extraConfig = ''
allow 10.0.0.0/24;
allow 10.3.0.0/24;
deny all;
'';
};
};
};
networking.extraHosts = ''
2022-02-15 10:58:08 +00:00
${network.architect-lan} ${domain}
${network.architect-wg} ${domain}
2021-07-07 13:13:19 +01:00
'';
2021-11-25 11:42:32 +00:00
users.groups.media.members = [ "jellyfin" ];
users.groups.video.members = [ "jellyfin" ];
users.groups.render.members = [ "jellyfin" ];
2022-03-15 15:58:04 +00:00
fileSystems."/tmp/jellyfin" = {
device = "none";
fsType = "tmpfs";
options = [ "defaults" "size=20G" "uid=jellyfin" ];
};
2021-07-07 13:13:19 +01:00
}