Commit graph

941 commits

Author SHA1 Message Date
88c1b8b2fe arr-interconnect: enforce Prowlarr local-auth bypass
Sonarr/Radarr/Bazarr default to DisabledForLocalAddresses so that requests
coming via the nginx reverse proxy (from 127.0.0.1) skip the app's own
login, leaving Authelia as the single gate. Prowlarr defaults to Enabled,
which produces a 401 behind Authelia.

Idempotent: only rewrites config.xml + restarts prowlarr when it finds
the "Enabled" value; logs a no-op otherwise. Added pkgs.systemd to PATH
so the restart call works.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 14:39:53 +01:00
081b12f945 2026-04-24 13:39:32 +01:00
bcaecc244d Put Servarr + qBit + games + search behind Authelia
Only Jellyfin and the Authelia portal itself stay unprotected externally
(Jellyfin because it's streamed to remote clients; Authelia because it
is the login gate). Everything else (sonarr, radarr, bazarr, prowlarr,
torrent/qBittorrent, games, search) now goes through Authelia forward auth.

Internal integrations (Homepage widgets, Prowlarr → Sonarr/Radarr,
Bazarr → Sonarr/Radarr, transcode-hevc qBit queries) use 127.0.0.1:PORT
directly, so they are unaffected.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 11:21:28 +01:00
0c937b8601 router: phase-2 cleanup + camera DHCP reservation
- trustedLegacyCidrs now empty; eno1 is strictly WAN
- AdGuard rewrite retargets nordhammer.it → 10.0.0.1 (the new router IP)
- dnsmasq pins the bedroom camera (f0:a7:31:6c:50:4b) to 10.0.0.39

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 10:52:11 +01:00
5426e3847b router: expose forwarded ports on eno1; AdGuard rewrite for LAN hostname
- Input chain now accepts WAN traffic for every port in ports.toml so
  external access (SSH, HTTP, HTTPS, game ports) works through the eero's
  upstream port forwards during phase 1, and via our own DNAT in phase 2.
- Add AdGuard DNS rewrite nordhammer.it → 192.168.4.25 so LAN clients
  hit the mediaserver directly instead of relying on eero hairpin NAT.
  Target changes to 10.0.0.1 at phase 2 cutover.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 10:22:56 +01:00
661ad14948 router: trust the legacy eero subnet on eno1 during phase 1
Without this, the default-drop input policy blocked SSH and AdGuard DNS
from existing 192.168.4.x clients because they arrive on eno1 (still
acting as a client on the eero network until phase 2 cutover).

The trustedLegacyCidrs list is meant to be emptied in phase 2 when
eno1 becomes the ISP-facing WAN.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 10:17:06 +01:00
350282c7c3 Merge branch 'main' of github.com:ediblerope/nixos-config 2026-04-24 09:48:43 +01:00
77eafded92 Turn mediaserver into a home router
Adds services/router.nix with systemd-networkd (eno1=WAN via DHCP,
eth0=LAN 10.0.0.1/24), nftables (NAT + firewall, default drop on WAN
in), dnsmasq (DHCP only — AdGuard Home keeps :53 for DNS), and sysctl
IP forwarding. NetworkManager is forced off on this host.

Port forwards live in ports.toml at the repo root and are imported via
builtins.fromTOML. Supports single ports, ranges ("26901-26902"), and
"both" protocol. Initial forwards: 22, 80, 443, 26900, 26901-26902.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 09:48:38 +01:00
ediblerope
0d81bd2700 flake: update inputs 2026-04-24 06:02:20 +00:00
b6131654ea Merge branch 'main' of github.com:ediblerope/nixos-config 2026-04-23 21:06:45 +01:00
11ca493d79 audio: bump ALSA input boost from 1.5x to 2.0x
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-23 21:06:39 +01:00
ediblerope
c04b7ea2a6 flake: update inputs 2026-04-23 05:58:27 +00:00
7ee5a37fc5 arr-interconnect: add gawk to PATH for idempotency check
The quality-floor helper uses awk to compare floats (since jq output
can be 10 vs 10.0 depending on type). Without gawk on PATH, the check
failed silently and every run issued PUTs even when values already
matched.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-22 21:44:02 +01:00
194d488942 arr-interconnect: floor 1080p quality at 10 MB/min
Sonarr/Radarr default minSize=0 let through tiny sub-bitrate releases
(e.g. 163 MiB for a 40-min episode = 0.8 Mbps, unwatchable). Set min to
10 MB/min (~1.3 Mbps) across HDTV/WEBDL/WEBRip/Bluray 1080p so anything
below that is rejected on grab. Idempotent: only PUTs when value differs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-22 21:41:50 +01:00
a825e36e2e Make AdGuard settings authoritative; add busybox; drop fallback DNS
- services/adguard.nix: mutableSettings = false so Nix config overrides
  UI-made changes on rebuild (settings are the source of truth)
- common.nix: add busybox for its collection of handy utilities
- common.nix: remove networking.nameservers — DNS now comes purely from
  per-host NetworkManager config (AdGuard as the only resolver, no leaks)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-22 19:57:55 +01:00
b7aa8e20ef nginx: move adguard vhost behind Authelia forward auth
Pairs with the prior commit that added the ACL rule.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-22 14:16:52 +01:00
070efb961a Wire AdGuard Home into Authelia SSO and Homepage dashboard
- adguard.nordhammer.it now routes through Authelia forward auth
  (AdGuard Home itself has no login, so this becomes the single gate)
- Added Authelia ACL rule for the subdomain so default_policy=deny
  returns 401 for redirect instead of 403
- Added AdGuard Home widget to Homepage under Infrastructure

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-22 14:15:57 +01:00
8aeb8e2de7 adguard: parallel upstreams + plain UDP fallbacks for speed
DoH-only sequential upstreams made first-time lookups slow. Add plain
UDP 1.1.1.1/9.9.9.9 alongside DoH and set upstream_mode=parallel so
AdGuard queries all four simultaneously and uses the fastest response.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-22 14:04:24 +01:00
919c991e3d Add AdGuard Home for network-wide DNS ad blocking
New services/adguard.nix runs AdGuard Home on the mediaserver with DoH
upstreams (Cloudflare + Quad9) and three default blocklists. DNS listens
on :53; web UI on 127.0.0.1:3000, reverse-proxied at adguard.nordhammer.it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-22 13:40:30 +01:00
ediblerope
12a8a4d88f flake: update inputs 2026-04-22 05:54:49 +00:00
ediblerope
b6de61fa5d flake: update inputs 2026-04-21 05:56:59 +00:00
41adf0d9f9 Revert transcode-hevc thread cap; let ffmpeg use all cores
Thread cap didn't move the thermals, so the real culprit is likely
dried-out thermal paste rather than concurrency. Reverting to the
unbounded default while the compound gets redone; running one stream
at a time is enough of a workaround in the meantime.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-20 12:14:46 +01:00
1fcfbedc9d Cap transcode-hevc to 8 ffmpeg threads by default
Concurrent transcodes on the 56-core mediaserver were running hot.
Limits each ffmpeg invocation to 8 threads via -threads and x265's
pools= param (libx265 ignores -threads alone). Overridable with
TRANSCODE_THREADS env var.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-20 12:04:13 +01:00
9f0b220427 Corrected sensors. 2026-04-20 11:34:49 +01:00
50b66a3262 Adding sensors 2026-04-20 11:33:29 +01:00
83eed3f8a0 Merge branch 'main' of github.com:ediblerope/nixos-config 2026-04-20 11:20:11 +01:00
97e4cd49d7 Adding usbutils 2026-04-20 11:19:11 +01:00
ediblerope
35ffa8593d flake: update inputs 2026-04-20 06:08:17 +00:00
13a2624f39
Merge pull request #9 from ediblerope/claude/fix-facetimehd-build-v2
facetimehd: fix overlay to extend linuxPackages_latest directly
2026-04-19 11:26:25 +00:00
Claude
2b09eae3fb
facetimehd: fix overlay to extend linuxPackages_latest directly
Overriding linuxPackagesFor doesn't affect the already-evaluated
linuxPackages_latest attribute. Extend it directly so the patched
facetimehd is picked up by boot.kernelPackages = pkgs.linuxPackages_latest.

https://claude.ai/code/session_01XEMg2HskwRaQW3nrCd1q2z
2026-04-19 11:25:26 +00:00
656738dcc2
Merge pull request #8 from ediblerope/claude/fix-facetimehd-build-nnUuj
Fix facetimehd driver compatibility with Linux 6.8
2026-04-19 11:21:01 +00:00
Claude
293e3306b3
facetimehd: patch out wait_prepare/wait_finish for Linux 7.0
struct vb2_ops dropped wait_prepare and wait_finish in Linux 6.8.
Add a nixpkgs overlay to sed them out of fthd_v4l2.c at build time.

https://claude.ai/code/session_01XEMg2HskwRaQW3nrCd1q2z
2026-04-19 11:18:58 +00:00
ediblerope
3b4714c722 flake: update inputs 2026-04-19 05:52:25 +00:00
032693ef39 Authorize 7dtd.nordhammer.it in Authelia ACL
Without this rule the subdomain falls under default_policy=deny,
which returns 403 instead of the 401 that nginx needs to redirect
to the Authelia login page.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 23:23:48 +01:00
dfbc727f5f Disable EAC on 7DTD server so Proton clients can connect
Proton-based clients (e.g. CachyOS native install hitting 7DTD via
the Proton runtime) fail EAC handshake against a Linux dedicated
server. Disabling server-side lets Proton clients join via the
"Play without EasyAntiCheat" splash option.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 23:05:08 +01:00
806adcfde7 Add gamescope to FredOS-Gaming for per-game FSR upscaling
Lets 7DTD (and other native titles lacking built-in FSR) render
internally at a lower resolution and upscale to the 3440x1440
display via gamescope's FSR filter.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 21:53:15 +01:00
740fca4fcf Expose 7DTD WebDashboard behind Authelia at 7dtd.nordhammer.it
Publishes the container's web dashboard port only on host loopback
(127.0.0.1:8090) so nginx can reverse-proxy it with Authelia
forward-auth, matching the Homepage/camera vhost pattern. Also flips
WebDashboardEnabled to true in the XML patcher so the server actually
starts the web server.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 21:43:11 +01:00
ediblerope
2a190bd39a flake: update inputs 2026-04-18 05:28:26 +00:00
c05f986e1c Add 7 Days to Die dedicated server container; drop V-Rising
Enables the previously-disabled game-servers module with a new 7DTD
container (vinanrra/7dtd-server) on ports 26900 TCP + 26900-26902 UDP.
A oneshot systemd service waits for LGSM's first install to drop
sdtdserver.xml, then patches in the server name, password, and
random-gen world before restarting the container. V-Rising is removed
— the module hadn't been imported, so this just drops dead code.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-17 22:28:49 +01:00
d80ccf4e6d Stop Sonarr/Radarr from nuking qBittorrent torrents after import
Sonarr was silently removing torrents from qBittorrent once imports
completed, killing seeding. Set removeCompletedDownloads to false for
both clients so torrents stick around and keep seeding post-import.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-17 21:23:28 +01:00
ediblerope
7234857b4a flake: update inputs 2026-04-17 05:57:50 +00:00
8b0e366f44
Add files via upload 2026-04-16 21:49:52 +00:00
d450b8e021 Seed placeholder latest.json so Homepage widget doesn't 404 pre-update
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-16 21:19:23 +01:00
f57c6e99ec Add Last Update widget to Homepage via record-update script
record-update parses nvd diff after switch and writes latest.json;
Homepage polls a local-only nginx listener and renders date/changes/
closure/kernel via a customapi widget.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-16 20:58:19 +01:00
916c1d1c2d Override Homepage's Tailwind slate classes instead of CSS variables
The previous template targeted CSS variables that Homepage doesn't
actually expose at runtime, so only a handful of containers picked up
the theme. Targeting .bg-slate-*/text-slate-* directly replaces the
compiled Tailwind palette with matugen colors across the dashboard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 20:36:38 +01:00
2709805c84 Scope matugen templates to hosts that can actually run them
btop is shared across all hosts, Homepage is mediaserver-only, and the
GNOME/Ghostty/VSCodium/Vesktop templates only apply to desktop hosts.
Emitting them everywhere made matugen error loudly on the server.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 20:33:40 +01:00
3a5daa6c80 Force home-manager to overwrite existing btop.conf
Mediaserver already had a btop.conf outside home-manager control, so
declarative adoption was refused. Setting force=true lets the managed
version take over.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 20:26:49 +01:00
2e29d3dce5 Force UMask=0002 on Radarr, Sonarr, Bazarr
New nixpkgs defaults for the *arr services set UMask=0022, which
conflicts with the media-group-writable overrides. Wrap with
lib.mkForce alongside the existing Jellyfin fix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 20:22:37 +01:00
c4421b32a8 Force Jellyfin UMask=0002 to override new nixpkgs default
nixpkgs now sets UMask=0077 on the Jellyfin service, conflicting with
our override that ensures media-group writes. Wrapping with lib.mkForce
restores the intended permission bits.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 20:20:01 +01:00
2096330eb8 Theme btop and Homepage via matugen on the mediaserver
Share the wallpaper symlink across all hosts by moving it from gnome.nix
into home-manager/fred.nix, and add matugen templates for btop and the
Homepage dashboard.

The Homepage NixOS module writes custom.css into /etc (read-only), so
bind-mount /var/lib/homepage-custom-css/custom.css over it. A systemd
path unit restarts homepage-dashboard whenever matugen rewrites the
file, so regeneration works without sudo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 20:17:38 +01:00