Compare commits
No commits in common. "f519aa419c98b40943a2221cdb3516f716273bdd" and "9ed944e6b4147d4b283505d11fd76e7f5822b0b4" have entirely different histories.
f519aa419c
...
9ed944e6b4
6 changed files with 123 additions and 139 deletions
36
flake.lock
36
flake.lock
|
@ -5,11 +5,11 @@
|
|||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1706708745,
|
||||
"narHash": "sha256-Lj8aG0TFoIU9Iut84ItiFmvZKScpNnMhWE8CEktTdmo=",
|
||||
"lastModified": 1706405338,
|
||||
"narHash": "sha256-bbhA+GIInRJJzNDf5YnUOOPwfQT/EzBJ1Og4/DjN9+4=",
|
||||
"owner": "Aylur",
|
||||
"repo": "ags",
|
||||
"rev": "5d94ad96e56eadadb6d948d6e5069aaba6ae9c85",
|
||||
"rev": "f5c2bbe3f68dd7a5316c3cd77e52076af560cd3e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -297,11 +297,11 @@
|
|||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1706702670,
|
||||
"narHash": "sha256-kfQNd8giG8hlal3/YlfCxQ7Wuhi69bxPPcffSVReH4c=",
|
||||
"lastModified": 1706571425,
|
||||
"narHash": "sha256-VwVUPb5vuy4GGUx1XMhDMaKk9n8Gs5xUTG9CItoHL04=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "Hyprland",
|
||||
"rev": "e6f7724ab0f72f190e0005c6959c11625cc0c6fe",
|
||||
"rev": "3ff59e7e1d859daa503b88ef125d087bc100abfe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -403,11 +403,11 @@
|
|||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1706645510,
|
||||
"narHash": "sha256-N0UCv+iyq8Lka1yi7fcLTS6i/S4UyP0POnk4nZV8HMA=",
|
||||
"lastModified": 1706619656,
|
||||
"narHash": "sha256-ulXRgLT7MCt6GtsUPMsrUiIlFBc9dy4edFcSOBQAF9Q=",
|
||||
"owner": "fufexan",
|
||||
"repo": "nix-gaming",
|
||||
"rev": "7f4173e132c1c4fb378cf55c495f9c953117fd43",
|
||||
"rev": "a6c2611520ad922726af3e15fcd6a4b940e86ec7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -568,11 +568,11 @@
|
|||
},
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1706550542,
|
||||
"narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=",
|
||||
"lastModified": 1706371002,
|
||||
"narHash": "sha256-dwuorKimqSYgyu8Cw6ncKhyQjUDOyuXoxDTVmAXq88s=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "97b17f32362e475016f942bbdfda4a4a72a8a652",
|
||||
"rev": "c002c6aa977ad22c60398daaa9be52f2203d0006",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -600,11 +600,11 @@
|
|||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1706708674,
|
||||
"narHash": "sha256-CRKrAQf0zUzT//ajWbuP8QPZxcs8nSux5nbXc6NQ0z4=",
|
||||
"lastModified": 1706619148,
|
||||
"narHash": "sha256-hxvNVo8OjUS8yaVy3LHX44hNxxkhBcuViYhhcHD7Umo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "88061a9d6cfd09617228d66fade1ac8ab46dea02",
|
||||
"rev": "0d59dcdfdbaf840996b4240295cf93342590e316",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -837,11 +837,11 @@
|
|||
"rust-overlay": "rust-overlay_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1706709259,
|
||||
"narHash": "sha256-TX7atonGJer7SZLZ9V+R23DmytoZaIrEDk62FzBW5yA=",
|
||||
"lastModified": 1706373041,
|
||||
"narHash": "sha256-Q5auhlofF2qoggN1cSGLOoOpzcrDnGA0YL1RLTbiC1I=",
|
||||
"owner": "sxyazi",
|
||||
"repo": "yazi",
|
||||
"rev": "e6079438a076710b0f6c785441293eaa480ea698",
|
||||
"rev": "68ffd82c0d703a8dd0f13c755b3f13e6046a2ad2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -109,13 +109,13 @@
|
|||
|
||||
"jellyfin.internal.flake.sh" = "192.168.1.98";
|
||||
"jellyseerr.internal.flake.sh" = "192.168.1.98";
|
||||
"sonarr.internal.flake.sh" = "192.168.1.98";
|
||||
"radarr.internal.flake.sh" = "192.168.1.98";
|
||||
"readarr.internal.flake.sh" = "192.168.1.98";
|
||||
"lidarr.internal.flake.sh" = "192.168.1.98";
|
||||
"whisparr.internal.flake.sh" = "192.168.1.98";
|
||||
"bazarr.internal.flake.sh" = "192.168.1.98";
|
||||
"prowlarr.internal.flake.sh" = "192.168.1.98";
|
||||
"sonarr.internal.flake.sh" = "192.168.1.54";
|
||||
"radarr.internal.flake.sh" = "192.168.1.54";
|
||||
"readarr.internal.flake.sh" = "192.168.1.54";
|
||||
"lidarr.internal.flake.sh" = "192.168.1.54";
|
||||
"whisparr.internal.flake.sh" = "192.168.1.54";
|
||||
"bazarr.internal.flake.sh" = "192.168.1.54";
|
||||
"prowlarr.internal.flake.sh" = "192.168.1.54";
|
||||
"stash.internal.flake.sh" = "192.168.1.98";
|
||||
"nextcloud.internal.flake.sh" = "192.168.1.199";
|
||||
|
||||
|
@ -127,7 +127,7 @@
|
|||
};
|
||||
};
|
||||
redis = {
|
||||
address = "192.168.1.211:6381";
|
||||
address = "100.94.214.100:6381";
|
||||
password = "blocky";
|
||||
database = 0;
|
||||
required = false;
|
||||
|
@ -143,7 +143,7 @@
|
|||
prefetchThreshold = 5;
|
||||
};
|
||||
prometheus = {
|
||||
enable = false;
|
||||
enable = true;
|
||||
path = "/metrics";
|
||||
};
|
||||
queryLog = {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
networking.firewall.allowedTCPPorts = [9292];
|
||||
imports = [
|
||||
./restic.nix
|
||||
./traefik.nix
|
||||
./torrent.nix
|
||||
];
|
||||
environment.systemPackages = [pkgs.recyclarr];
|
||||
|
|
80
hosts/kariru/services/traefik.nix
Normal file
80
hosts/kariru/services/traefik.nix
Normal file
|
@ -0,0 +1,80 @@
|
|||
_: {
|
||||
networking.firewall.allowedTCPPorts = [80 443];
|
||||
services.traefik = {
|
||||
enable = true;
|
||||
dynamicConfigOptions = {
|
||||
http = {
|
||||
routers = {
|
||||
api = {
|
||||
rule = "PathPrefix(`/api/`)";
|
||||
entryPoints = ["websecure"];
|
||||
service = "api@internal";
|
||||
};
|
||||
sonarr = {
|
||||
rule = "Host(`sonarr.internal.flake.sh`)";
|
||||
entryPoints = ["web"];
|
||||
service = "sonarr";
|
||||
};
|
||||
radarr = {
|
||||
rule = "Host(`radarr.internal.flake.sh`)";
|
||||
entryPoints = ["web"];
|
||||
service = "radarr";
|
||||
};
|
||||
readarr = {
|
||||
rule = "Host(`readarr.internal.flake.sh`)";
|
||||
entryPoints = ["web"];
|
||||
service = "readarr";
|
||||
};
|
||||
lidarr = {
|
||||
rule = "Host(`lidarr.internal.flake.sh`)";
|
||||
entryPoints = ["web"];
|
||||
service = "lidarr";
|
||||
};
|
||||
bazarr = {
|
||||
rule = "Host(`bazarr.internal.flake.sh`)";
|
||||
entryPoints = ["web"];
|
||||
service = "bazarr";
|
||||
};
|
||||
whisparr = {
|
||||
rule = "Host(`whisparr.internal.flake.sh`)";
|
||||
entryPoints = ["web"];
|
||||
service = "whisparr";
|
||||
};
|
||||
prowlarr = {
|
||||
rule = "Host(`prowlarr.internal.flake.sh`)";
|
||||
entrypoints = ["web"];
|
||||
service = "prowlarr";
|
||||
};
|
||||
};
|
||||
services = {
|
||||
sonarr.loadBalancer.servers = [{url = "http://localhost:8989";}];
|
||||
radarr.loadBalancer.servers = [{url = "http://localhost:7878";}];
|
||||
readarr.loadBalancer.servers = [{url = "http://localhost:8787";}];
|
||||
lidarr.loadBalancer.servers = [{url = "http://localhost:8686";}];
|
||||
bazarr.loadBalancer.servers = [{url = "http://localhost:6767";}];
|
||||
whisparr.loadBalancer.servers = [{url = "http://localhost:6969";}];
|
||||
prowlarr.loadBalancer.servers = [{url = "http://localhost:9696";}];
|
||||
};
|
||||
};
|
||||
};
|
||||
staticConfigOptions = {
|
||||
log.level = "DEBUG";
|
||||
api.dashboard = false;
|
||||
api.insecure = false;
|
||||
global = {
|
||||
checkNewVersion = false;
|
||||
sendAnonymousUsage = false;
|
||||
};
|
||||
entryPoints = {
|
||||
websecure = {
|
||||
address = ":443";
|
||||
forwardedHeaders.insecure = true;
|
||||
};
|
||||
web = {
|
||||
address = ":80";
|
||||
forwardedHeaders.insecure = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -195,10 +195,10 @@
|
|||
staticConfigOptions = {
|
||||
log.level = "DEBUG";
|
||||
api.dashboard = false;
|
||||
api.insecure = false;
|
||||
api.insecure = true;
|
||||
global = {
|
||||
checkNewVersion = false;
|
||||
sendAnonymousUsage = true;
|
||||
sendAnonymousUsage = false;
|
||||
};
|
||||
entryPoints = {
|
||||
websecure = {
|
||||
|
|
|
@ -1,20 +1,10 @@
|
|||
{config, ...}: {
|
||||
networking.firewall.allowedTCPPorts = [80 443 8080];
|
||||
sops.secrets.cloudflare-api-key = {};
|
||||
systemd.services.traefik = {
|
||||
environment = {
|
||||
CLOUDFLARE_EMAIL = "jch0tm2e@notohh.dev";
|
||||
};
|
||||
serviceConfig = {
|
||||
EnvironmentFile = [config.sops.secrets.cloudflare-api-key.path];
|
||||
};
|
||||
};
|
||||
_: {
|
||||
networking.firewall.allowedTCPPorts = [80 443];
|
||||
services.traefik = {
|
||||
enable = true;
|
||||
dynamicConfigOptions = {
|
||||
http = {
|
||||
routers = {
|
||||
# local
|
||||
api = {
|
||||
rule = "PathPrefix(`/api/`)";
|
||||
entryPoints = ["websecure"];
|
||||
|
@ -22,113 +12,46 @@
|
|||
};
|
||||
homepage = {
|
||||
rule = "Host(`dashboard.internal.flake.sh`)";
|
||||
entrypoints = ["websecure"];
|
||||
entrypoints = ["web"];
|
||||
service = "homepage";
|
||||
tls.domains = [{main = "*.internal.flake.sh";}];
|
||||
tls.certresolver = "production";
|
||||
};
|
||||
stash = {
|
||||
rule = "Host(`stash.internal.flake.sh`)";
|
||||
entrypoints = ["websecure"];
|
||||
entrypoints = ["web"];
|
||||
service = "stash";
|
||||
tls.domains = [{main = "*.internal.flake.sh";}];
|
||||
tls.certresolver = "production";
|
||||
};
|
||||
jellyfin = {
|
||||
rule = "Host(`jellyfin.internal.flake.sh`)";
|
||||
entrypoints = ["websecure"];
|
||||
entrypoints = ["web"];
|
||||
service = "jellyfin";
|
||||
tls.domains = [{main = "*.internal.flake.sh";}];
|
||||
tls.certresolver = "production";
|
||||
};
|
||||
jellyseerr = {
|
||||
rule = "Host(`jellyseerr.internal.flake.sh`)";
|
||||
entrypoints = ["websecure"];
|
||||
entrypoints = ["web"];
|
||||
service = "jellyseerr";
|
||||
tls.domains = [{main = "*.internal.flake.sh";}];
|
||||
tls.certresolver = "production";
|
||||
};
|
||||
wallos = {
|
||||
rule = "Host(`wallos.internal.flake.sh`)";
|
||||
entrypoints = ["websecure"];
|
||||
entrypoints = ["web"];
|
||||
service = "wallos";
|
||||
tls.domains = [{main = "*.internal.flake.sh";}];
|
||||
tls.certresolver = "production";
|
||||
};
|
||||
searxng = {
|
||||
rule = "Host(`search.internal.flake.sh`)";
|
||||
entrypoints = ["websecure"];
|
||||
entrypoints = ["web"];
|
||||
service = "searxng";
|
||||
tls.domains = [{main = "*.internal.flake.sh";}];
|
||||
tls.certresolver = "production";
|
||||
};
|
||||
hass = {
|
||||
rule = "Host(`hass.internal.flake.sh`)";
|
||||
entrypoints = ["websecure"];
|
||||
entrypoints = ["web"];
|
||||
service = "hass";
|
||||
tls.domains = [{main = "*.internal.flake.sh";}];
|
||||
tls.certresolver = "production";
|
||||
};
|
||||
paperless = {
|
||||
rule = "Host(`paperless.internal.flake.sh`)";
|
||||
entrypoints = ["websecure"];
|
||||
entrypoints = ["web"];
|
||||
service = "paperless";
|
||||
tls.domains = [{main = "*.internal.flake.sh";}];
|
||||
tls.certresolver = "production";
|
||||
};
|
||||
# kariru
|
||||
sonarr = {
|
||||
rule = "Host(`sonarr.internal.flake.sh`)";
|
||||
entryPoints = ["websecure"];
|
||||
service = "sonarr";
|
||||
tls.domains = [{main = "*.internal.flake.sh";}];
|
||||
tls.certresolver = "production";
|
||||
};
|
||||
radarr = {
|
||||
rule = "Host(`radarr.internal.flake.sh`)";
|
||||
entryPoints = ["websecure"];
|
||||
service = "radarr";
|
||||
tls.domains = [{main = "*.internal.flake.sh";}];
|
||||
tls.certresolver = "production";
|
||||
};
|
||||
readarr = {
|
||||
rule = "Host(`readarr.internal.flake.sh`)";
|
||||
entryPoints = ["websecure"];
|
||||
service = "readarr";
|
||||
tls.domains = [{main = "*.internal.flake.sh";}];
|
||||
tls.certresolver = "production";
|
||||
};
|
||||
lidarr = {
|
||||
rule = "Host(`lidarr.internal.flake.sh`)";
|
||||
entryPoints = ["websecure"];
|
||||
service = "lidarr";
|
||||
tls.domains = [{main = "*.internal.flake.sh";}];
|
||||
tls.certresolver = "production";
|
||||
};
|
||||
bazarr = {
|
||||
rule = "Host(`bazarr.internal.flake.sh`)";
|
||||
entryPoints = ["websecure"];
|
||||
service = "bazarr";
|
||||
tls.domains = [{main = "*.internal.flake.sh";}];
|
||||
tls.certresolver = "production";
|
||||
};
|
||||
whisparr = {
|
||||
rule = "Host(`whisparr.internal.flake.sh`)";
|
||||
entryPoints = ["websecure"];
|
||||
service = "whisparr";
|
||||
tls.domains = [{main = "*.internal.flake.sh";}];
|
||||
tls.certresolver = "production";
|
||||
};
|
||||
prowlarr = {
|
||||
rule = "Host(`prowlarr.internal.flake.sh`)";
|
||||
entrypoints = ["websecure"];
|
||||
service = "prowlarr";
|
||||
tls.domains = [{main = "*.internal.flake.sh";}];
|
||||
tls.certresolver = "production";
|
||||
};
|
||||
};
|
||||
services = {
|
||||
# local
|
||||
stash.loadBalancer.servers = [{url = "http://localhost:9999";}];
|
||||
homepage.loadBalancer.servers = [{url = "http://localhost:7676";}];
|
||||
jellyfin.loadBalancer.servers = [{url = "http://localhost:8096";}];
|
||||
|
@ -136,22 +59,14 @@
|
|||
wallos.loadBalancer.servers = [{url = "http://localhost:8282";}];
|
||||
searxng.loadBalancer.servers = [{url = "http://localhost:8100";}];
|
||||
hass.loadBalancer.servers = [{url = "http://localhost:8123";}];
|
||||
paperless.loadBalancer.servers = [{url = "http://localhost:28981";}];
|
||||
# kariru
|
||||
sonarr.loadBalancer.servers = [{url = "http://192.168.1.54:8989";}];
|
||||
radarr.loadBalancer.servers = [{url = "http://192.168.1.54:7878";}];
|
||||
readarr.loadBalancer.servers = [{url = "http://192.168.1.54:8787";}];
|
||||
lidarr.loadBalancer.servers = [{url = "http://192.168.1.54:8686";}];
|
||||
bazarr.loadBalancer.servers = [{url = "http://192.168.1.54:6767";}];
|
||||
whisparr.loadBalancer.servers = [{url = "http://192.168.1.54:6969";}];
|
||||
prowlarr.loadBalancer.servers = [{url = "http://192.168.1.54:9696";}];
|
||||
paperless.loadBalancer.servers = [{url = "http://100.108.113.89:28981";}];
|
||||
};
|
||||
};
|
||||
};
|
||||
staticConfigOptions = {
|
||||
log.level = "DEBUG";
|
||||
api.dashboard = true;
|
||||
api.insecure = true;
|
||||
api.dashboard = false;
|
||||
api.insecure = false;
|
||||
global = {
|
||||
checkNewVersion = false;
|
||||
sendAnonymousUsage = false;
|
||||
|
@ -166,18 +81,6 @@
|
|||
forwardedHeaders.insecure = true;
|
||||
};
|
||||
};
|
||||
certificatesResolvers = {
|
||||
production.acme = {
|
||||
email = "x3xr6n66@notohh.dev";
|
||||
storage = "/var/lib/traefik/acme.json";
|
||||
caServer = "https://acme-v02.api.letsencrypt.org/directory";
|
||||
dnsChallenge = {
|
||||
provider = "cloudflare";
|
||||
resolvers = ["1.1.1.1:53" "1.0.0.1:53"];
|
||||
delayBeforeCheck = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue