chore: arr to NAS
buildbot/nix-eval Build done. (1 warning)
buildbot/nix-build Build done.
buildbot/nix-effects Build done.

This commit is contained in:
Greg Hellings
2026-06-04 13:31:26 -05:00
parent bb7a01f758
commit 394c2c2aba
3 changed files with 32 additions and 76 deletions
-70
View File
@@ -1,70 +0,0 @@
{
lib,
metadata,
pkgs,
...
}:
let
ips = lib.filterAttrs (_k: v: v ? "ip" && v.ip != null) metadata.hosts;
tps = lib.filterAttrs (_k: v: v ? "ts" && v.ts != null) metadata.hosts;
get = field: set: lib.mapAttrsToList (_k: v: v.${field}) set;
getTS = get "ts" tps;
getIP = get "ip" ips;
whitelists = builtins.concatStringsSep "," (
[
"localhost"
"127.0.0.1"
]
++ getTS
++ getIP
);
in
{
services = {
prowlarr = {
enable = true;
dataDir = "/arr/prowlarr";
openFirewall = true;
};
radarr = {
enable = true;
openFirewall = true;
};
transmission = {
enable = true;
openPeerPorts = true;
openRPCPort = true;
package = pkgs.transmission_4;
settings = {
download-dir = "/arr/transmission/downloads";
rpc-bind-address = "0.0.0.0";
rpc-host-whitelist = whitelists;
rpc-host-whitelist-enabled = false;
rpc-whitelist = whitelists;
rpc-whitelist-enabled = false;
watch-dir-enabled = true;
watch-dir = "/arr/transmission/incoming";
};
};
};
systemd.mounts =
let
nfs = name: {
what = "nas1.shire-zebra.ts.net:/mnt/all/${name}";
type = "nfs";
name = "${name}.mount";
where = "/${name}";
requires = [ "tailscaled-autoconnect.service" ];
after = [ "tailscaled-autoconnect.service" ];
wantedBy = [ "multi-user.target" ];
mountConfig.Options = "_netdev,noexec,timeo=50,retrans=5,soft";
};
in
[
(nfs "arr")
(nfs "music")
(nfs "photos")
(nfs "video")
];
}
+19 -1
View File
@@ -18,7 +18,6 @@ in
{
imports = [
# Include the results of the hardware scan.
./arr.nix
./hardware-configuration.nix
top.niks3.nixosModules.niks3
];
@@ -200,6 +199,25 @@ in
};
};
systemd.mounts =
let
nfs = name: {
what = "nas1.shire-zebra.ts.net:/mnt/all/${name}";
type = "nfs";
name = "${name}.mount";
where = "/${name}";
requires = [ "tailscaled-autoconnect.service" ];
after = [ "tailscaled-autoconnect.service" ];
wantedBy = [ "multi-user.target" ];
mountConfig.Options = "_netdev,noexec,timeo=50,retrans=5,soft";
};
in
[
(nfs "music")
(nfs "photos")
(nfs "video")
];
# After first deploy: create a Grafana service account + API token for Klaatu
# via the Grafana UI, then encrypt it: agenix -e secrets/grafana-api-token.age
age.secrets.grafana-api-token = {
+13 -5
View File
@@ -399,16 +399,24 @@
name = "Media";
bookmarks = [
{
name = "Prowlarr";
url = "https://hosea.shire-zebra.ts.net:9696/";
name = "Flaresolverr";
url = "http://nas1.shire-zebra.ts.net:30098";
}
{
name = "Transmission";
url = "https://hosea.shire-zebra.ts.net:9091/";
name = "Prowlarr";
url = "http://nas1.shire-zebra.ts.net:30050/";
}
{
name = "Sonarr (TV)";
url = "http://nas1.shire-zebra.ts.net:30113/";
}
{
name = "Radarr (Movies)";
url = "https://hosea.shire-zebra.ts.net:7878/";
url = "http://nas1.shire-zebra.ts.net:30025/";
}
{
name = "Transmission";
url = "http://nas1.shire-zebra.ts.net:30096/";
}
];
}