Personal NixOS and Home Manager configuration, managed with Nix flakes.
This repository holds the declarative configuration for a single machine:
- khazad-dum: Framework 16" laptop (AMD 7040) running NixOS with integrated Home Manager, on the
nixos-unstablechannel
- Flake-based configuration for reproducibility
- Modular design: NixOS modules under
nixos_modules.<name>, Home Manager modules underhome_modules.<name> - Home Manager wired into the NixOS system (no standalone HM profile)
- Declarative disk layout with disko (LUKS + ext4)
- Secure Boot via lanzaboote
- Secrets management with sops-nix
- Hyprland window manager with hypridle, hyprlock and hyprshot
- Catppuccin Macchiato theming, centralised through catppuccin/nix
- Terminal multiplexer (Zellij) and emulator (Alacritty) configurations
- Nix with flakes enabled
nh(Nix Helper) for building and switching- For secrets: sops-nix set up with the appropriate age keys
nh os build # Build without switching
nh os test # Build and switch, but don't persist across reboots
nh os switch # Build and switch the system
# Dry-run build verification (no root needed)
nix build .#nixosConfigurations.khazad-dum.config.system.build.toplevel --dry-run
# Evaluate a single option without a full build
nix eval .#nixosConfigurations.khazad-dum.config.programs.steam.enable# Update all flake inputs
nix flake update
# Update a specific input
nix flake update nixpkgs# Clean old generations and optimize the Nix store
nh clean all
# Clean only the user profile
nh clean user
# Clean only the system profile
nh clean systemnix-config/
├── flake.nix # Main flake configuration
├── flake.lock # Locked dependency versions
├── .sops.yaml # Secrets configuration
├── hosts/
│ └── khazad-dum/ # Framework 16" laptop
│ ├── configuration.nix # Main NixOS configuration
│ ├── hardware-configuration.nix
│ ├── disko.nix # Declarative disk layout
│ ├── lanzaboote.nix # Secure Boot
│ ├── network.nix # NetworkManager/iwd, DNS
│ ├── modules.nix # Enabled NixOS modules
│ ├── packages.nix # System packages
│ ├── services.nix # System services
│ ├── systemd.nix # Systemd units
│ ├── users.nix # User accounts
│ ├── locales.nix # Locale settings
│ └── home-manager/
│ ├── home.nix # Home Manager entry point
│ ├── modules.nix # Enabled Home Manager modules
│ ├── packages.nix # User packages
│ ├── services.nix # User services
│ └── root.nix # Home Manager config for root
├── modules/
│ ├── home-manager/ # Options under home_modules.<name>
│ │ ├── alacritty.nix # Terminal emulator
│ │ ├── claude-code/ # Claude Code CLI
│ │ ├── hyprland/ # Hyprland, hypridle, hyprlock, hyprshot
│ │ ├── neovim/ # Editor
│ │ ├── swaync/ # Notifications
│ │ ├── waybar/ # Status bar
│ │ ├── zellij/ # Terminal multiplexer
│ │ └── … # git, jujutsu, ssh, starship, zsh, …
│ └── nixos/ # Options under nixos_modules.<name>
│ ├── claude-desktop-cowork.nix
│ ├── f5.nix # F5 VPN client and split tunnel
│ ├── greetd.nix # Display manager
│ ├── nautilus.nix # File manager
│ └── nh.nix # nh utility
├── packages/ # Custom package derivations
│ ├── claude-desktop.nix
│ ├── f5vpn-ng.nix
│ └── update.sh # Refreshes pinned versions/checksums
├── docs/plans/ # Design and migration notes
└── secrets/ # Encrypted secrets
Framework 16" laptop (AMD 7040) running NixOS, using the nixos-hardware
framework-16-7040-amd module.
Environment:
- OS: NixOS (
nixos-unstable) - WM: Hyprland (primary) / GNOME
- Display Manager: greetd running ReGreet
- Terminal: Alacritty
- Shell: zsh with starship
- Multiplexer: Zellij
- Editor: Neovim
- Launcher: Walker, backed by elephant
- Status bar: Waybar
- Notifications: swaync
Storage and boot:
- LUKS + ext4, partitioned declaratively with disko
- systemd-boot with Secure Boot via lanzaboote
Networking:
- NetworkManager with the iwd backend
- nftables firewall
| Input | Description |
|---|---|
| nixpkgs | NixOS packages (nixos-unstable) |
| home-manager | Home Manager (follows nixpkgs) |
| catppuccin | Catppuccin theming for both system and Home Manager |
| sops-nix | Secrets management |
| nixos-hardware | Hardware-specific NixOS modules |
| zen-browser | Zen Browser |
| nix-index-database | Prebuilt nix-index database |
| disko | Declarative disk partitioning |
| lanzaboote | Secure Boot support |
| jj-lsp | Jujutsu LSP server (applied as an overlay) |
Secrets are encrypted using sops-nix:
- Configure age keys in
.sops.yaml - Store encrypted secrets in
secrets/ - Reference secrets in configurations
- Secrets are decrypted at build time
- Edit configuration files
- Test build without activating:
nh os build
- Review changes
- Activate the configuration:
nh os switch
- Commit to version control
- Create the module in
modules/home-manager/ormodules/nixos/ - Add it to the matching
default.nixaggregator - Enable it from
hosts/khazad-dum/modules.nixorhosts/khazad-dum/home-manager/modules.nix
- Create or edit the secret file
- Encrypt it with sops:
sops secrets/filename.yaml
- Reference it in the configuration
- Rebuild the system
See LICENSE file for details.