This repository contains my personal NixOS configuration files for system and service management. Configurations are fully declarative and managed via Nix Flakes.
Primary workstation for daily use, development, and gaming. With a customized Plasma desktop environment.
Central homelab node running 24/7 with high uptime. Provides centralized storage, self-hosted services, and automated backups. Operates as a low-power HTPC capable of directing input to TVs and handling light gaming. Hosts containerized services while maintaining remote accessibility.
- Clone repository to target machine:
sudo nix-shell -p git --run "git clone https://github.com/your/repo /etc/nixos"
- Build system configuration (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 management via
agenix
- Automatic service-specific firewall rules
- Full disk encryption by default
- SSH key-based remote access
- Create host directory:
mkdir -p hosts/new-host
- Generate hardware configuration:
nixos-generate-config --dir hosts/new-host
- Add to flake outputs:
nixosConfigurations.new-host = lib.nixosSystem { /* configuration */ };
- Rollback to previous configuration:
sudo nixos-rebuild switch --rollback
- Investigate service failures:
journalctl -u failed-service -b