nixos/hosts/architect/nzbget.nix

37 lines
831 B
Nix
Raw Normal View History

{ config, lib, ... }:
let
domain = "htnzb.giugl.io";
auth_block = (import ./openid.nix { inherit lib; }).openresty_oidc_block;
utilities = import ./utilities.nix { inherit lib config; };
inherit (utilities) architectInterfaceAddress;
2023-02-11 02:29:48 +00:00
in
{
2021-07-07 13:13:19 +01:00
services = {
2022-02-15 10:58:08 +00:00
nzbget = {
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://127.0.0.1:6789";
2022-10-28 13:56:40 +01:00
extraConfig = auth_block {
access_role = "nzbget";
2022-10-28 13:56:40 +01:00
};
2021-07-07 13:13:19 +01:00
};
};
};
networking.extraHosts = ''
${architectInterfaceAddress "lan"} ${domain}
${architectInterfaceAddress "wireguard"} ${domain}
${architectInterfaceAddress "tailscale"} ${domain}
2021-07-07 13:13:19 +01:00
'';
2021-11-25 11:42:32 +00:00
users.groups.media.members = [ "nzbget" ];
2021-07-07 13:13:19 +01:00
}