nixos/hosts/architect/sonarr.nix

36 lines
778 B
Nix
Raw Normal View History

{ lib, ... }:
let
domain = "htson.giugl.io";
network = import ./network.nix;
2022-10-28 13:48:46 +01:00
auth_block = (import ./openid.nix).openresty_oidc_block;
in {
2021-07-07 13:13:19 +01:00
services = {
2022-02-15 10:58:08 +00:00
sonarr = {
enable = true;
group = "media";
};
2021-07-07 13:13:19 +01:00
nginx.virtualHosts.${domain} = {
2021-07-07 13:13:19 +01:00
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:8989";
2022-10-28 13:48:46 +01:00
extraConfig = auth_block {
realm = "master";
client_id = "sonarr";
client_secret = "d36ehMSPCI3xLfOGNcnSUKZWQblyGumi";
redirect_uri = "https://${domain}";
};
2021-07-07 13:13:19 +01:00
};
};
};
networking.extraHosts = ''
${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 = [ "sonarr" ];
2021-07-07 13:13:19 +01:00
}