Former-commit-id: 9863bdbdd0
This commit is contained in:
Hadi
2025-03-19 22:05:17 +01:00
parent 0b1f3996cf
commit 9e53d48c68
7 changed files with 191 additions and 23 deletions

123
flake.lock generated
View File

@@ -786,10 +786,30 @@
"type": "github"
}
},
"nixarr": {
"inputs": {
"nixpkgs": "nixpkgs_4",
"vpnconfinement": "vpnconfinement",
"website-builder": "website-builder"
},
"locked": {
"lastModified": 1742243092,
"narHash": "sha256-pTMB/aLTufgNX3rJlT5Ia64TofZxOdEGMl9nfc3D++o=",
"owner": "rasmus-kirk",
"repo": "nixarr",
"rev": "046ec8d875611ec2c93d5c45eebf6b46f0f350e8",
"type": "github"
},
"original": {
"owner": "rasmus-kirk",
"repo": "nixarr",
"type": "github"
}
},
"nixcord": {
"inputs": {
"flake-compat": "flake-compat_2",
"nixpkgs": "nixpkgs_4",
"nixpkgs": "nixpkgs_5",
"systems": "systems_3",
"treefmt-nix": "treefmt-nix"
},
@@ -839,6 +859,22 @@
"type": "github"
}
},
"nixpkgs_10": {
"locked": {
"lastModified": 1741513245,
"narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1742069588,
@@ -872,6 +908,22 @@
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1741402956,
"narHash": "sha256-y2hByvBM03s9T2fpeLjW6iprbxnhV9mJMmSwCHc41ZQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "ed0b1881565c1ffef490c10d663d4f542031dad3",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1742169275,
"narHash": "sha256-nkH2Edu9rClcsQp2PYBe8E6fp8LDPi2uDBQ6wyMdeXI=",
@@ -887,7 +939,7 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_6": {
"locked": {
"lastModified": 1735554305,
"narHash": "sha256-zExSA1i/b+1NMRhGGLtNfFGXgLtgo+dcuzHzaWA6w3Q=",
@@ -903,7 +955,7 @@
"type": "github"
}
},
"nixpkgs_6": {
"nixpkgs_7": {
"locked": {
"lastModified": 1742069588,
"narHash": "sha256-C7jVfohcGzdZRF6DO+ybyG/sqpo1h6bZi9T56sxLy+k=",
@@ -919,33 +971,33 @@
"type": "github"
}
},
"nixpkgs_7": {
"nixpkgs_8": {
"locked": {
"lastModified": 1741513245,
"narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=",
"lastModified": 1742272065,
"narHash": "sha256-ud8vcSzJsZ/CK+r8/v0lyf4yUntVmDq6Z0A41ODfWbE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1",
"rev": "3549532663732bfd89993204d40543e9edaec4f2",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_8": {
"nixpkgs_9": {
"locked": {
"lastModified": 1741513245,
"narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=",
"owner": "nixos",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1",
"type": "github"
},
"original": {
"owner": "nixos",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
@@ -1061,9 +1113,10 @@
"hyprland": "hyprland",
"hyprpanel": "hyprpanel",
"hyprspace": "hyprspace",
"nixarr": "nixarr",
"nixcord": "nixcord",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_6",
"nixpkgs": "nixpkgs_7",
"nixvim": "nixvim",
"sops-nix": "sops-nix",
"spicetify-nix": "spicetify-nix",
@@ -1157,9 +1210,7 @@
},
"sops-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
"nixpkgs": "nixpkgs_8"
},
"locked": {
"lastModified": 1742239755,
@@ -1208,7 +1259,7 @@
"git-hooks": "git-hooks",
"gnome-shell": "gnome-shell",
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_7",
"nixpkgs": "nixpkgs_9",
"nur": "nur",
"systems": "systems_6",
"tinted-foot": "tinted-foot",
@@ -1404,7 +1455,7 @@
},
"treefmt-nix": {
"inputs": {
"nixpkgs": "nixpkgs_5"
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1739829690,
@@ -1442,6 +1493,42 @@
"type": "github"
}
},
"vpnconfinement": {
"locked": {
"lastModified": 1740921534,
"narHash": "sha256-orXe3m04DLTW3I19VVanClzpqeq7adnDTqKAD7aPbA8=",
"owner": "Maroka-chan",
"repo": "VPN-Confinement",
"rev": "5eb7dc3e901f4dbb085eb37f5785473a9ae78bc4",
"type": "github"
},
"original": {
"owner": "Maroka-chan",
"repo": "VPN-Confinement",
"type": "github"
}
},
"website-builder": {
"inputs": {
"nixpkgs": [
"nixarr",
"nixpkgs"
]
},
"locked": {
"lastModified": 1741594814,
"narHash": "sha256-YPAIywsWZVhQuy/cPJLi3PiWgoWDrqvQCBytXeSQYCk=",
"owner": "rasmus-kirk",
"repo": "website-builder",
"rev": "e0239195b33103a4923011d8e96ef39a3397631b",
"type": "github"
},
"original": {
"owner": "rasmus-kirk",
"repo": "website-builder",
"type": "github"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": [
@@ -1485,7 +1572,7 @@
},
"zen-browser": {
"inputs": {
"nixpkgs": "nixpkgs_8"
"nixpkgs": "nixpkgs_10"
},
"locked": {
"lastModified": 1741802754,

View File

@@ -14,6 +14,8 @@
apple-fonts.url = "github:Lyndeno/apple-fonts.nix";
zen-browser.url = "git+https://git.sr.ht/~canasta/zen-browser-flake/";
nixcord.url = "github:kaylorben/nixcord";
sops-nix.url = "github:Mic92/sops-nix";
nixarr.url = "github:rasmus-kirk/nixarr";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
@@ -26,10 +28,6 @@
url = "github:Gerg-L/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprspace = {
url = "github:KZDKM/Hyprspace";
inputs.hyprland.follows = "hyprland";
@@ -60,6 +58,7 @@
inputs.home-manager.nixosModules.home-manager
inputs.stylix.nixosModules.stylix
inputs.sops-nix.nixosModules.sops
inputs.nixarr.nixosModules.default
./hosts/server/configuration.nix
];
};

View File

@@ -16,6 +16,7 @@
../../server-modules/glance.nix
../../server-modules/adguardhome.nix
../../server-modules/hoarder.nix
../../server-modules/arr.nix
# You should let those lines as is
./hardware-configuration.nix

View File

@@ -27,6 +27,7 @@
jq
just
pnpm
wireguard-tools
# Utils
zip

View File

@@ -17,7 +17,7 @@
nextcloud-pwd = { path = "/etc/nextcloud/pwd.txt"; };
adguard-pwd = { };
hoarder = { };
wireguard-pia = { owner = "nixarr"; };
wireguard-pia = { };
};
};
}

43
server-modules/arr.nix Normal file
View File

@@ -0,0 +1,43 @@
{ config, ... }:
let
domain = "hadi.diy";
mkVirtualHost = name: port: {
useACMEHost = domain;
forceSSL = true;
locations."/" = { proxyPass = "http://127.0.0.1:${toString port}"; };
};
in {
nixarr = {
enable = true;
vpn = {
enable = true;
wgConf = config.sops.secrets.wireguard-pia.path;
};
mediaDir = "/data/media";
stateDir = "/data/.state/nixarr";
jellyfin.enable = true;
jellyseerr.enable = true;
prowlarr.enable = true;
radarr.enable = true;
sonarr.enable = true;
sabnzbd.enable = true;
transmission = {
enable = true;
extraSettings = { trash-original-torrent-files = true; };
vpn.enable = true;
};
recyclarr.enable = true;
};
services.nginx.virtualHosts = {
"jellyfin.${domain}" = mkVirtualHost "jellyfin" 8096;
"jellyseerr.${domain}" = mkVirtualHost "jellyseerr" 5055;
"prowlarr.${domain}" = mkVirtualHost "prowlarr" 9696;
"radarr.${domain}" = mkVirtualHost "radarr" 7878;
"sonarr.${domain}" = mkVirtualHost "sonarr" 8989;
"sabnzbd.${domain}" = mkVirtualHost "sabnzbd" 8080;
"transmission.${domain}" = mkVirtualHost "transmission" 9091;
};
}

View File

@@ -126,6 +126,43 @@ in {
}
];
}
{
type = "monitor";
title = "*arr";
cache = "1m";
sites = [
{
title = "Jellyfin";
url = "https://jellyfin.hadi.diy";
icon = "si:jellyfin";
}
{
title = "Radarr";
url = "https://radarr.hadi.diy";
icon = "si:radarr";
}
{
title = "Sonarr";
url = "https://sonarr.hadi.diy";
icon = "si:sonarr";
}
{
title = "Prowlarr";
url = "https://prowlarr.hadi.diy";
icon = "si:prowlarr";
}
{
title = "SABnzbd";
url = "https://sabnzbd.hadi.diy";
icon = "si:sabnzbd";
}
{
title = "Transmission";
url = "https://transmission.hadi.diy";
icon = "si:transmission";
}
];
}
{
type = "repository";
repository = "anotherhadi/nixy";