Why I Picked NixOS for a 24/7 Home AI Server, and the 5 Gotchas That Bit Me During Install
说明与用途
作者在无头 RTX 5090 服务器上安装了 NixOS,解决了 Wi‑Fi、btrfs 和省电模式问题,并获得了声明式配置和回滚的优势。
问题
Running a headless 24/7 AI server with a new RTX 5090 GPU required an OS that could provide declarative configuration, easy rollback, and reproducibility, while handling WiFi connectivity and power‑save issues during installation.
结果
The author successfully installed a headless NixOS server with an RTX 5090 GPU, resolved WiFi connectivity and power‑save issues, and achieved declarative configuration with rollback capability.
工作流
- Boot NixOS 26.05 minimal ISO and mount target disk with btrfs subvolumes
- Connect to WiFi using
nmcli device wifi connect "SSID" password "pass" - Copy NetworkManager profiles to /mnt/etc/NetworkManager/system-connections before installing
- Run
nixos-generate-configand edit hardware-configuration.nix to addcompress=zstdandnoatimeoptions - Disable WiFi power‑save with
iw dev wlp7s0 set power_save offor setwifi.powersave = 2;in configuration.nix - Use
sudo sh -c "cp ... *.nmconnection ..."for remote glob expansion
证据
I built a home AI server that runs around the clock, as a playground to mess with local LLMs.
The ISO’s wpa_supplicant.service starts with -u (D-Bus mode, no -i) as an NM-only backend, so writing your own conf never grabs the interface.
The WiFi connection info you set up on the ISO does not carry over to the install target.
Average 83ms, max 257ms on a LAN. Normal LAN values are 2–5ms, so something was clearly off.
Result: average 8ms, max 18ms — about a 10x improvement.
- 记录日期: 2026-10-21T16:41:24.935Z