Multi-host NixOS flake configuration with Hyprland, Nvidia, and sing-box proxy.
- sakost-pc: Main PC with 2x NVMe, LUKS encryption, TPM auto-unlock, Secure Boot
- sakost-pc-portable: Portable/temp disk setup
├── flake.nix # Flake entry point
├── hosts/ # Per-host configurations
│ ├── sakost-pc/ # Main PC (LUKS + TPM + Secure Boot)
│ └── sakost-pc-portable/ # Portable host
├── modules/ # Shared NixOS modules
│ ├── hardware/ # GPU, CPU, audio, bluetooth, TPM
│ ├── desktop/ # Hyprland, greetd, XDG portals
│ ├── programs/ # zsh, fonts, git, nix-ld
│ └── services/ # SSH, networking, proxy
├── lib/ # Shared Nix libraries
│ └── theme.nix # Centralized theme (colors, fonts, opacity)
├── home/ # Home-manager configuration
│ ├── sakost.nix # User entry point
│ ├── xdg.nix # XDG dirs, env vars, cache paths
│ ├── programs/ # User programs (nixvim, zsh, waybar, etc.)
│ └── desktop/ # Hyprland user config
└── secrets/ # SOPS-encrypted secrets
cd ~
git clone <repo-url> nixos-config
cd nixos-configsakost-pc uses the SSH host key for age decryption (available before /home mounts):
# The age key is derived from /etc/ssh/ssh_host_ed25519_key
# Add the host's age public key to .sops.yamlsakost-pc-portable uses a user age key:
mkdir -p ~/.config/sops/age
age-keygen -o ~/.config/sops/age/keys.txt
# Add your public key to .sops.yamlThen create and encrypt the sing-box config:
nvim secrets/sing-box.json # Create with your credentials
sops -e -i secrets/sing-box.jsonsudo nixos-rebuild switch --flake .#sakost-pc- Nvidia GPU with proprietary drivers
- Intel/AMD CPU microcode updates
- PipeWire audio (low-latency)
- Bluetooth support
- TPM 2.0 with systemd-initrd auto-unlock (sakost-pc)
- Hyprland Wayland compositor with HDR (4K@144Hz)
- Waybar status bar with calendar tooltip
- greetd display manager with ReGreet (GTK4 graphical greeter)
- hyprlock lock screen
- XDG desktop portals
- swww wallpaper daemon
- Walker clipboard provider (built-in, no separate cliphist needed)
- Telegram Desktop (autostart minimized to tray)
- Editors: Nixvim with full IDE setup (LSPs, completion, telescope, git integration)
- Shells: Zsh with starship prompt, atuin history, autosuggestions, syntax highlighting
- Terminal: Alacritty (50k scrollback)
- Launcher: Walker (Wayland-native, built-in clipboard/files/windows/calculator)
- File manager: Nautilus (GUI), yazi (terminal)
- Browsers: Google Chrome
- Dev tools: rustup (stable), Go, Node.js, npm, Yarn, uv, ripgrep, direnv + nix-direnv
- CLI tools: Claude Code, eza, bat, fd, fzf, zoxide, atuin, tldr, fastfetch
- GUI apps: Telegram Desktop, Google Chrome
- Compatibility: nix-ld for running unpatched binaries
TokyoNight dark theme defined in lib/theme.nix and shared across all components (alacritty, waybar, mako, eww, wlogout, hyprlock, walker, starship, fzf, zathura, yazi, hyprland, greetd). All colors, fonts, opacity, and border values are centralized — edit one file to retheme everything.
- OpenSSH (key-only auth)
- sing-box proxy with VLESS Reality (TUN mode)
- NetworkManager
- Full XDG Base Directory compliance
- Package manager caches centralized to
~/dev/cache/<name>(npm, yarn, uv, pip, cargo, go, cuda)
Uses SOPS with age encryption. Keys are derived from SSH host keys (sakost-pc) or user age keys (portable).
Files:
.sops.yaml- SOPS configuration with public keyssecrets/sing-box.json- Encrypted sing-box config
sops secrets/sing-box.json # Auto-decrypt/encrypt
sops -d secrets/sing-box.json # Decrypt to view- Create
hosts/<hostname>/withdefault.nix,hardware.nix,disk-config.nix - Add to
flake.nix:nixosConfigurations.<hostname> = mkHost "<hostname>";
- Update
.sops.yamlwith the host's age public key
# Rebuild aliases (defined in home/programs/zsh.nix)
nrs # nixos-rebuild switch --flake ~/nixos-config
nrb # nixos-rebuild build --flake ~/nixos-config
nrt # nixos-rebuild test --flake ~/nixos-config
# Edit config
ne # nvim ~/nixos-config
# Flake operations
nix flake check
nix flake update
# Garbage collection
sudo nix-collect-garbage -d| Key | Action |
|---|---|
<Space> |
Leader key |
<leader>e |
Toggle file explorer |
<leader>ff |
Find files |
<leader>fg |
Live grep |
<leader>fb |
Find buffers |
<leader>gg |
Open LazyGit |
gd |
Go to definition |
gr |
Find references |
K |
Hover documentation |
<leader>rn |
Rename symbol |
<leader>ca |
Code action |
Personal configuration - use at your own risk.