diff --git a/containers/default.nix b/containers/default.nix index 0bbbc58..747edcf 100644 --- a/containers/default.nix +++ b/containers/default.nix @@ -3,6 +3,7 @@ imports = [ ./jellyfin.nix ./qbittorrent.nix + ./prowlarr.nix ./lidarr.nix ]; @@ -10,6 +11,7 @@ jellyfin.enable = lib.mkDefault false; qbittorrent.enable = lib.mkDefault false; lidarr.enable = lib.mkDefault false; + prowlarr.enable = lib.mkDefault false; }; } diff --git a/containers/prowlarr.nix b/containers/prowlarr.nix new file mode 100644 index 0000000..c7ade0e --- /dev/null +++ b/containers/prowlarr.nix @@ -0,0 +1,40 @@ +{ + config, + lib, + pkgs, + ... +}: +{ + options.settings.containers.prowlarr = { + enable = lib.mkEnableOption "enable prowlarr arion container"; + }; + + config = lib.mkIf config.settings.containers.prowlarr.enable { + virtualisation.arion.projects.prowlarr = { + settings = { + project.name = "prowlarr"; + services.prowlarr = { + service.useHostStore = true; + nixos.useSystemd = true; + nixos.configuration = + { lib, ... }: + { + boot.isContainer = true; + boot.tmp.useTmpfs = true; + networking.useDHCP = false; + services.nscd.enable = false; + system.nssModules = lib.mkForce [ ]; + + services.prowlarr.enable = true; + services.prowlarr.openFirewall = true; + }; + service.ports = [ "9696:9696" ]; + service.volumes = [ + "/config/prowlarr:/config" + "/data:/data" + ]; + }; + }; + }; + }; +}