This repository contains my personal NixOS configuration files.
The migration of my devices and home server to NixOS is still in progress. The goal of this project is to rewrite everything I run in a declarative way.
- Purpose: Daily driver workstation
- Features:
- Gaming/Streaming setup
- NVIDIA GPU acceleration
- Virtualization (QEMU/Docker)
- Plasma desktop customization
- Purpose: Lightweight server & backup
- Features:
- Remote access
- Automated storage mounting
- Service containerization
- Low-power operation
- Clone repo to target machine:
sudo nix-shell -p git --run "git clone https://github.com/your/repo /etc/nixos"
- Build system (Kairos example):
sudo nixos-rebuild switch --flake path:/etc/nixos#kairos
- Apply configuration changes:
sudo nixos-rebuild switch --flake path:.#$(hostname)
- Update flake inputs:
nix flake update
graph TD
A[Make changes] --> B{Test locally?}
B -->|Yes| C[nixos-rebuild test]
B -->|No| D[nixos-rebuild switch]
C --> E[Verify functionality]
E --> F[Commit changes]
F --> G[Push to repo]
- Secrets managed through
agenix
- Automatic firewall rules for services
- Encrypted root partition by default
- Remote access via SSH keys
- Create host directory:
mkdir -p hosts/new-machine
- Generate hardware config:
nixos-generate-config --dir hosts/new-machine
- Add to flake outputs:
nixosConfigurations.new-machine = lib.nixosSystem { /* config */ };
- Roll back to previous generation:
sudo nixos-rebuild switch --rollback
- Inspect failed service:
journalctl -u failed-service -b