diff options
Diffstat (limited to 'modules/nixfiles/radarr.nix')
-rw-r--r-- | modules/nixfiles/radarr.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/nixfiles/radarr.nix b/modules/nixfiles/radarr.nix new file mode 100644 index 0000000..f57efc9 --- /dev/null +++ b/modules/nixfiles/radarr.nix @@ -0,0 +1,27 @@ +{ + config, + lib, + ... +}: +with lib; let + cfg = config.nixfiles.modules.radarr; +in { + options.nixfiles.modules.radarr = { + enable = mkEnableOption "Whether to enable Radarr."; + + domain = mkOption { + description = "Domain name sans protocol scheme."; + type = with types; str; + default = "radarr.${config.networking.fqdn}"; + }; + }; + + config = mkIf cfg.enable { + nixfiles.modules.nginx = { + enable = true; + virtualHosts.${cfg.domain}.locations."/".proxyPass = "http://127.0.0.1:7878"; + }; + + services.radarr.enable = true; + }; +} |