nixos/hosts/architect/lidarr.nix

36 lines
778 B
Nix
Raw Normal View History

{ config, lib, ... }:
2022-02-15 10:58:08 +00:00
let
domain = "htlid.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
{
2022-02-15 10:58:08 +00:00
services = {
lidarr = {
enable = true;
group = "media";
};
nginx.virtualHosts.${domain} = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:8686";
2022-10-28 13:48:46 +01:00
extraConfig = auth_block {
access_role = "lidarr";
2022-10-28 13:48:46 +01:00
};
2022-02-15 10:58:08 +00:00
};
};
};
networking.extraHosts = ''
${architectInterfaceAddress "lan"} ${domain}
${architectInterfaceAddress "tailscale"} ${domain}
2022-02-15 10:58:08 +00:00
'';
2022-02-15 10:58:08 +00:00
users.groups.media.members = [ "lidarr" ];
}