nixos/hosts/architect/sonarr.nix
Giulio De Pasquale 608fd46eb4 Formatting
2023-02-11 03:29:48 +01:00

35 lines
699 B
Nix

{ lib, ... }:
let
domain = "htson.giugl.io";
network = import ./network.nix;
auth_block = (import ./openid.nix { inherit lib; }).openresty_oidc_block;
in
{
services = {
sonarr = {
enable = true;
group = "media";
};
nginx.virtualHosts.${domain} = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:8989";
extraConfig = auth_block {
access_role = "sonarr";
};
};
};
};
networking.extraHosts = ''
${network.architect-lan} ${domain}
${network.architect-wg} ${domain}
${network.architect-ts} ${domain}
'';
users.groups.media.members = [ "sonarr" ];
}