Commit graph

164 commits

Author SHA1 Message Date
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
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
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
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
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
df227ad173 Revert "Add Tdarr transcoding manager for bulk H.264→HEVC conversion"
This reverts commit 91c437de6d.
2026-04-15 10:23:28 +01:00
91c437de6d Add Tdarr transcoding manager for bulk H.264→HEVC conversion
Runs Tdarr server with internal node on the mediaserver for managing
library-wide re-encoding to save disk space. Web UI at tdarr.nordhammer.it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 10:17:09 +01:00
e1f073969b Fix reboot alias auth prompt and minor formatting
Add sudo to reboot alias so it doesn't prompt for password.
Add blank line before networking.hostName in hardware config.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 09:23:12 +01:00
a109d5a5c7 Disable game servers while not in use
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 22:10:20 +01:00
8aa7beccd6 Re-enable all services after secret migration to new server
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 21:59:18 +01:00
5b12b59654 Temporarily disable game servers for server migration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 16:05:16 +01:00
3c8d5678b0 Temporarily disable services requiring secrets for server migration
Commented out nginx, go2rtc, cloudflare-ddns, fail2ban, and authelia
until secrets are migrated to the new server hardware.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 16:03:50 +01:00
25189a0d99 Skip matugen in update alias when not installed
Guard matugen call with command -v check so the update alias
works on hosts without GNOME/matugen (e.g. mediaserver).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 09:44:00 +01:00
effa5e5cbb Add wallpaper-based color theming with matugen
- Matugen templates for Ghostty theme and GTK4 colors
- Ghostty uses generated wallpaper theme instead of Catppuccin
- GTK4 CSS imports generated color overrides
- Update alias runs matugen after switch to regenerate colors
- Add wallpaper fish function to change wallpaper + regen colors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 19:56:38 +01:00
7a6ee02360 Forward arguments through update alias to nixos-rebuild
Allows passing flags like --refresh to both build and switch steps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 19:43:32 +01:00
e19c03bda6 Fix update alias for fish compatibility
Wrap in bash -c since fish doesn't support bash variable
assignment syntax in aliases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 11:48:27 +01:00
e156d79862 Show nvd package diff after switch completes
Saves the old system path before switching so nvd can compare
old vs new after everything else finishes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 11:47:06 +01:00
7088f1d68e Add nvd package diff to update alias
The update alias now builds first, shows a readable diff of
added/removed/upgraded packages via nvd, then switches.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 11:44:28 +01:00
e3a208deae Remove Helium browser
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 21:18:25 +01:00
c6986a8a3c Add Helium browser with Proton Pass and disabled password manager
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 21:13:45 +01:00
Claude
a35281419f
Move V-Rising Docker server into game-servers.nix
Consolidates V-Rising into the existing game-servers module instead of
a separate file. Also uncomments the game-servers import in common.nix
and adds UDP 9876/9877 to the shared firewall rules.

https://claude.ai/code/session_01Ays1x4CUUJE1jPLkeNMojV
2026-04-11 14:46:04 +00:00
Claude
f556d887c3
Add V-Rising dedicated server via Docker on FredOS-Mediaserver
Uses NixOS virtualisation.oci-containers (Docker backend) with the
trueosiris/vrising image. Persists server files and save data under
/var/lib/v-rising/. Opens UDP 9876/9877 in the firewall.

https://claude.ai/code/session_01Ays1x4CUUJE1jPLkeNMojV
2026-04-11 14:45:02 +00:00
9c08a9e0ef Rename fastfetch.nix -> settings/shell.nix, remove flatpaks
- Move shell/prompt/font config from apps/fastfetch.nix to settings/shell.nix
- Remove flatpaks.nix and nix-flatpak flake input (no flatpak packages in use)
- Update readme structure and flake inputs table

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 14:03:34 +01:00
efd3351ee7 Powerline-style prompt with background colors, remove fastfetch from startup
- Prompt segments now have background colors (green/yellow/blue pills)
- NixOS icon  visible in green pill segment
- Remove fastfetch from terminal startup and clear alias
- fastfetch still available via manual `fastfetch` command

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 13:34:36 +01:00
09d00909cb Switch to fish shell, ghostty terminal, and simplified prompt
- Replace bash with fish as default shell (all hosts)
- Replace kgx with ghostty (desktop hosts), update Super+T keybinding
- Custom two-line fish prompt: NixOS icon, username, path, hostname, ❯
- Nix-shell awareness, red ❯ on error
- Simplify fastfetch: user@host, OS, kernel, shell, terminal, uptime, memory
- Ghostty config: FiraCode Nerd Font, catppuccin-mocha, no titlebar

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 13:22:21 +01:00
eadbc92126 Replace Docker containers with native NixOS modules for nginx, Authelia, and go2rtc
- Native nginx with ACME wildcard cert (*.nordhammer.it) via Cloudflare DNS-01
- Native Authelia SSO with forward auth protecting homepage + camera
- Native go2rtc camera streaming (no more Docker)
- Auto-migration script for Authelia secrets and user database from Docker
- Homepage hrefs updated to use HTTPS domain names
- Fail2ban updated for native nginx log paths + new Authelia jail

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 15:47:56 +01:00
f59fce5087 Add auto-interconnect service for *arr stack
Systemd oneshot that runs after all services start and configures:
- Prowlarr → Sonarr (TV indexers, full sync)
- Prowlarr → Radarr (movie indexers, full sync)
- Sonarr → qBittorrent (download client, category: tv-sonarr)
- Radarr → qBittorrent (download client, category: radarr)
- Bazarr → Sonarr (subtitle management for TV)
- Bazarr → Radarr (subtitle management for movies)

Fully idempotent — checks for existing connections before creating.
API keys extracted from each app's config files at runtime.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 13:45:53 +01:00
29dae0c5ea Add Homepage dashboard for FredOS-Mediaserver
Covers all running services: Jellyfin, Sonarr, Radarr, Bazarr, Prowlarr,
qBittorrent, Nginx Proxy Manager, Authelia, go2rtc. Live widgets for
*arr apps, Jellyfin now-playing, and qBittorrent speed use API keys
loaded from /etc/homepage-secrets (outside the Nix store).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 12:55:42 +01:00
39450ca786 Remove Suricata/ELK; add SSH key auth and disable password login
Adds authorised keys for FredOS-Gaming and phone. Disables SSH password
authentication on FredOS-Mediaserver — key auth only going forward.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 21:48:08 +01:00
699bbd9f9a Add ELK stack for Suricata log visualisation
Elasticsearch + Kibana + Filebeat in Docker, bridged via an elk network.
Filebeat uses the Suricata module to parse eve.json and auto-installs
Kibana dashboards on first run. ES heap capped at 1g; Kibana Node heap
at 512m — total stack ~2-2.5 GB RAM.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 21:25:29 +01:00
b91b0ef234 Add Suricata IDS to FredOS-Mediaserver
Passive network monitoring via af-packet on eno1. Rulesets auto-updated
from ET/Open, abuse.ch, and other community sources via suricata-update.
Runs alongside fail2ban; IPS/blocking mode can be enabled later.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 20:36:45 +01:00
Claude
6b432f3bc2
Remove CrowdSec — replaced by fail2ban
https://claude.ai/code/session_01PwAXuaoJx7qD5FhVLsn7Sn
2026-04-06 08:28:08 +00:00
Claude
16363dc887
fail2ban: add jails for SSH, nginx proxy manager, and Jellyfin
Replaces bare enable flag with a dedicated service module covering:
- SSH brute force via journald
- Nginx Proxy Manager auth failures via Docker log files
- Jellyfin auth failures via journald
Includes incremental ban times (up to 1 week) and LAN ignore rules.

https://claude.ai/code/session_01PwAXuaoJx7qD5FhVLsn7Sn
2026-04-06 08:21:23 +00:00
509c4cc47d Add CrowdSec IPS with firewall bouncer on FredOS-Mediaserver
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 22:59:37 +01:00
4b41511e39
Update common.nix 2026-04-05 11:21:25 +01:00
93ea194da4 Reorganise hardware vs host config, tidy settings and services 2026-04-01 21:16:59 +01:00
59e4d997cd
2026-03-28 19:40:00 +00:00
f6fb6ceba1
2026-03-28 15:57:10 +00:00
880f56265f
2026-03-28 15:34:14 +00:00
e0305d672c
2026-03-28 15:30:07 +00:00
5c96b6fa02
2026-03-28 15:28:37 +00:00
d0ed3fe5c8
2026-03-28 14:54:56 +00:00
570871787f
2026-03-28 13:14:22 +00:00
50f2224f04
2026-03-28 12:41:29 +00:00
a7719779bd
2026-03-28 12:40:30 +00:00
d58afb8db7
2026-03-28 12:26:11 +00:00
164400d0a6
2026-03-28 12:22:00 +00:00
8cce4008b0
2026-03-28 12:19:20 +00:00
ece3e15341
2026-03-28 12:18:19 +00:00
4bab9998ca
updating update alias 2026-03-28 12:00:08 +00:00