Flake lock file updates: • Updated input 'agenix': 'github:ryantm/agenix/f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41?narHash=sha256-b%2Buqzj%2BWa6xgMS9aNbX4I%2BsXeb5biPDi39VgvSFqFvU%3D' (2024-08-10) → 'github:ryantm/agenix/e600439ec4c273cf11e06fe4d9d906fb98fa097c?narHash=sha256-uenf8fv2eG5bKM8C/UvFaiJMZ4IpUFaQxk9OH5t/1gA%3D' (2025-01-15) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/5d7db4668d7a0c6cc5fc8cf6ef33b008b2b1ed8b?narHash=sha256-4Xhu/3aUdCKeLfdteEHMegx5ooKQvwPHNkOgNCXQrvc%3D' (2025-02-25) → 'github:NixOS/nixpkgs/7819a0d29d1dd2bc331bec4b327f0776359b1fa6?narHash=sha256-BgkBz4NpV6Kg8XF7cmHDHRVGZYnKbvG0Y4p%2BjElwxaM%3D' (2025-04-05) |
||
---|---|---|
modules | ||
scripts | ||
secrets | ||
well-known/matrix | ||
configuration.nix | ||
flake.lock | ||
flake.nix | ||
LICENSE.md | ||
Makefile | ||
README.org |
NixOS Server
Configuration files for my personal server, powered by NixOS.
Modules
The configuration is sliced into different files, per category:
- ZFS pool configuration: hardware-configuration.nix
- Network configuration: networking.nix
- Synchronization and backup services: datasync.nix
- Web services and reverse proxy: webstack.nix
- Development tools: devops.nix
- Smartd: monitoring.nix
- Systemd services and timers: periodic.nix
- Curated articles: information.nix
All the modules are imported in configuration.nix
Installation
- Download the sdcard image
- Use initial config file
cp install.nix configuration.nix
- Move the repo to the server and the agenix key
scp -r Projects/zion zion:/home/nixos/system
scp .ssh/zion root@zion:/etc/ssh/id_ed25519
- Mount the firmware partition
mount /dev/mmcblk1p1 /boot
- Rebuild the system using Flakes
nix-shell -p git
sudo nixos-rebuild switch --flake /home/nixos/system#zion
- Restore the SQL databases
gunzip -c /vault/backups/zion/databases/all.sql.gz | psql -U postgres