Nix configurations for my homelab
0

Configure Feed

Select the types of activity you want to include in your feed.

at main 2.1 kB View raw
1{ config, nixpkgs-unstable, ... }: 2{ 3 environment.persistence."/data/persistent".directories = [ 4 # NOTE: Prowlarr isn't here since it uses /var/lib/private/prowlarr as its directory regardless and this directory 5 # is already in nixos-impermanence 6 { 7 directory = "/var/lib/radarr"; 8 mode = "0700"; 9 user = config.services.radarr.user; 10 group = config.services.radarr.group; 11 } 12 { 13 directory = "/var/lib/sonarr"; 14 mode = "0700"; 15 user = config.services.sonarr.user; 16 group = config.services.sonarr.group; 17 } 18 ]; 19 20 sops = { 21 secrets = { 22 "prowlarr-apikey" = { }; 23 "radarr-apikey" = { }; 24 "sonarr-apikey" = { }; 25 }; 26 templates = { 27 prowlarr-env.content = "PROWLARR__AUTH__APIKEY=${config.sops.placeholder."prowlarr-apikey"}"; 28 radarr-env.content = "RADARR__AUTH__APIKEY=${config.sops.placeholder."radarr-apikey"}"; 29 sonarr-env.content = "SONARR__AUTH__APIKEY=${config.sops.placeholder."sonarr-apikey"}"; 30 }; 31 }; 32 33 # Help prevent from rebuilding chromium all the time 34 nixpkgs.overlays = [ 35 (final: prev: { inherit (nixpkgs-unstable.legacyPackages.${prev.stdenv.hostPlatform.system}) chromium; }) 36 ]; 37 38 networking.firewall.interfaces.${config.services.netbird.clients.homelab.interface}.allowedTCPPorts = [ 39 config.services.prowlarr.settings.server.port 40 config.services.radarr.settings.server.port 41 config.services.sonarr.settings.server.port 42 ]; 43 44 services = { 45 flaresolverr.enable = true; 46 prowlarr = { 47 enable = true; 48 environmentFiles = [ config.sops.templates.prowlarr-env.path ]; 49 settings.log.level = "info"; 50 }; 51 radarr = { 52 enable = true; 53 environmentFiles = [ config.sops.templates.radarr-env.path ]; 54 settings.log.level = "info"; 55 }; 56 sonarr = { 57 enable = true; 58 environmentFiles = [ config.sops.templates.sonarr-env.path ]; 59 settings.log.level = "info"; 60 }; 61 }; 62 63 systemd.services.flaresolverr.serviceConfig.RestrictAddressFamilies = [ "~AF_INET6" ]; 64}