From Old Laptop to Reliable Home Server: NixOS + Pi-hole + Unbound
I had an old laptop collecting dust, so I turned it into a quiet, low-power home server. The stack is simple and resilient:
- NixOS for reproducible system config
- Pi-hole for network-wide ad and tracker blocking
- Unbound as a local recursive DNS resolver
This setup gives you better privacy, fewer third-party DNS dependencies, and a server you can rebuild from config.
Why an old laptop works well
An old laptop is a solid starter server because it already includes:
- Built-in UPS behavior (battery)
- Low power usage
- Quiet operation
- Enough CPU and RAM for DNS, reverse proxy, backups, and small apps
For a home lab, that is usually more valuable than raw performance.
NixOS base setup
After installing NixOS, I keep almost everything in /etc/nixos/configuration.nix (and split into modules later).
Minimal baseline:
1 | { config, pkgs, ... }: |
Then apply:
1 | sudo nixos-rebuild switch |
Pi-hole + Unbound architecture
DNS flow:
- Devices send DNS queries to Pi-hole.
- Pi-hole filters known ads/trackers.
- Allowed queries are forwarded to local Unbound.
- Unbound resolves recursively from root DNS servers.
This avoids sending all your DNS traffic to a public resolver.
Containerized services with Podman
I run Pi-hole and Unbound as containers with Podman (rootless where practical). A compact compose.yml example:
1 | services: |
Bring it up:
1 | podman compose up -d |
Hardening and reliability checklist
- Set router DHCP to advertise only Pi-hole as DNS.
- Keep server on a static LAN IP.
- Back up Pi-hole config and your NixOS config repo.
- Enable automatic NixOS updates only after testing on a safe schedule.
- Pin container images when you want strict reproducibility.
What improved immediately
- Faster perceived browsing on many sites
- Cleaner mobile apps due to DNS-level blocking
- Better observability of noisy clients in the network
- Confidence that I can rebuild the server from code
Final note
If you are starting self-hosting, this is a high-value first project. You get practical Linux admin experience, network visibility, and a privacy upgrade without buying new hardware.
Title: From Old Laptop to Reliable Home Server: NixOS + Pi-hole + Unbound
Author: Nemanja Djurcic
Date: 07-02-2026
Last Update: 07-02-2026
Blog Link: https://blog.nemanjadjurcic.com/2026/02/07/nixos-selfhosting-old-laptop-pihole-unbound/
Copyright Declaration: The author owns the copyright, please indicate the source reproduced.
Share