A declarative NixOS configuration for single-user workstations using Flakes and Disko, featuring Hyprland with Lumen Desktop Shell.
The Fedora 44 installation of the Dell XPS is managed separately, without Nix, by the Ansible configuration in the fedora-config repository.
- Declarative disk partitioning with Disko
- Full disk encryption with LUKS2 (interactive passphrase at boot)
- Btrfs filesystem with subvolumes and zstd compression
- Passwordless auto-login via greetd (password set after first boot)
- Hyprland window manager with Lumen Desktop Shell
- Home Manager integration for user configuration
| Host | Description | GPU |
|---|---|---|
kraken |
Desktop PC | AMD Radeon RX 7700 XT / 7800 XT |
thebeast |
Threadripper workstation | AMD Radeon RX 7700 XT / 7800 XT |
G1a |
HP ZBook Ultra G1a | AMD Strix Halo (RDNA 3.5) |
z2-mini-g1a |
HP Z2 Mini G1a Workstation | AMD Strix Halo (RDNA 3.5) |
proart |
ASUS ProArt P16 OLED | AMD + NVIDIA RTX 5090 |
xps |
Dell XPS 14 | Intel Panther Lake |
| Partition | Size | Filesystem | Description |
|---|---|---|---|
| ESP | 2 GB | FAT32 | EFI boot partition (/boot) |
| Root | Remaining | Btrfs (LUKS2) | Encrypted root with subvolumes |
| Subvolume | Mount Point | Purpose |
|---|---|---|
@ |
/ |
Root filesystem |
@home |
/home |
User home directories |
@nix |
/nix |
Nix store |
@var-log |
/var/log |
System logs |
Swap is handled by zram (25% of RAM) - no swap partition.
- Official NixOS minimal ISO (download from nixos.org)
- UEFI-capable system
- Internet connection (Ethernet or WiFi)
Boot from the NixOS minimal ISO. You'll be logged in as nixos with root privileges.
For WiFi:
nmtuiSelect "Activate a connection" and connect to your network.
For Ethernet: Should work automatically.
Verify connectivity:
ping -c 1 github.comOfficial NixOS minimal ISO:
The stock installer ISO does not enable flakes for ad-hoc nix run, so use:
nix --extra-experimental-features "nix-command flakes" run github:DigitalPals/nixos-config#forgeForge ISO built from this repo: Forge starts automatically on login. If you need to restart it manually:
forge-startupRun the Forge installer directly from the flake:
nix --extra-experimental-features "nix-command flakes" run github:DigitalPals/nixos-config#forgeThe interactive TUI will guide you through:
- Select your host (
kraken,thebeast,G1a,z2-mini-g1a,proart, orxps) - Select the target disk
- Choose your user account and swap mode
- Choose whether to keep the checked-in hardware profile or generate a live hardware layer
- Confirm the installation (type 'yes')
Forge keeps the checked-in hardware profile by default. If you want live machine detection, opt into it during the hardware profile step or use the command-line flag below.
Alternatively, run with arguments for non-interactive install:
nix --extra-experimental-features "nix-command flakes" run github:DigitalPals/nixos-config#forge -- install kraken /dev/nvme0n1To opt into a live hardware refresh from the command line:
nix --extra-experimental-features "nix-command flakes" run github:DigitalPals/nixos-config#forge -- install xps /dev/nvme0n1 --refresh-hardwareThe installer will:
- Partition and format the disk
- Mount the filesystems
- Install NixOS with your configuration
- This typically takes 10-30 minutes depending on your internet speed
reboot- Enter your LUKS passphrase at the boot prompt
- You'll be automatically logged in as
john(no password required) - Set your user password:
passwd
Codex CLI (npm) and Claude Code are installed via Home Manager activation. This is best-effort:
- If online, they are installed on first activation.
- If offline, installation is skipped and retried on the next activation.
For future modifications:
git clone https://github.com/DigitalPals/nixos-config.git ~/nixos-config
cd ~/nixos-configAfter making changes to the configuration:
sudo nixos-rebuild switch --flake ~/nixos-config#G1aOr use the included alias:
nrs # nixos-rebuild switchAll normal workstation profiles include Rust sccache defaults. Without a token,
this behaves as a local compiler cache. To enable distributed Rust compilation via
the Beast rust-builder LXC (10.10.0.233), install the shared client token on
each NixOS machine and rebuild:
sudo install -d -m 0750 -o root /etc/sccache
ssh root@10.10.0.233 "awk -F ' = ' '/^token = / { gsub(/\"/, \"\", \$2); print \$2; exit }' /etc/sccache/client.conf" \
| sudo install -m 0600 -o root /dev/stdin /etc/sccache/client-token
sudo nixos-rebuild switch --flake ~/nixos-config#$(hostname)After rebuilding, new shells use:
RUSTC_WRAPPER=sccache
SCCACHE_CONF=/etc/sccache/client.conf
CARGO_INCREMENTAL=0Verify from a project with:
sccache --dist-status
sccache --zero-stats
cargo clean && cargo build
sccache --show-stats | grep -A2 "Successful distributed compiles"Run Forge to update flake inputs, rebuild, and update CLI tools:
nix run github:DigitalPals/nixos-config#forge -- updateOr if you have the config cloned locally:
nix run .#forge -- updateThis will:
- Update all flake inputs (
nix flake update) - Rebuild the system if there are changes
- Update Claude Code and Codex CLI
- Check browser profile sync status
nixos-config/
├── flake.nix # Main flake with host configurations
├── flake.lock # Locked dependencies
├── hosts/
│ ├── kraken/ # Desktop configuration (AMD)
│ │ ├── default.nix
│ │ └── hardware-configuration.nix
│ ├── thebeast/ # Threadripper workstation (AMD)
│ │ ├── default.nix
│ │ └── hardware-configuration.nix
│ ├── G1a/ # HP ZBook Ultra G1a (AMD)
│ │ ├── default.nix
│ │ └── hardware-configuration.nix
│ ├── z2-mini-g1a/ # HP Z2 Mini G1a (AMD)
│ │ ├── default.nix
│ │ └── hardware-configuration.nix
│ ├── proart/ # ASUS ProArt P16 OLED
│ │ ├── default.nix
│ │ └── hardware-configuration.nix
│ └── xps/ # Dell XPS 14
│ ├── default.nix
│ └── hardware-configuration.nix
├── modules/
│ ├── common.nix # Shared system configuration
│ ├── desktop-environments.nix
│ ├── disko/ # Disk partitioning
│ │ ├── default.nix # Common disko config
│ │ ├── kraken.nix # Kraken disk device
│ │ ├── thebeast.nix # Thebeast disk device
│ │ ├── G1a.nix # G1a disk device
│ │ ├── z2-mini-g1a.nix # HP Z2 Mini G1a disk device
│ │ ├── proart.nix # ProArt disk device (LVM for hibernate)
│ │ └── xps.nix # XPS disk device
│ ├── boot/
│ │ └── limine-plymouth.nix
│ └── hardware/
│ ├── amd.nix
│ └── nvidia.nix
├── home/ # Home Manager configuration
│ ├── home.nix # Main config
│ ├── ghostty.nix # Terminal configuration
│ ├── hyprland/ # Hyprland window manager config
│ │ ├── autostart.nix
│ │ └── bindings.nix
│ └── shells/
│ ├── common/ # Shared shell, prompt, and theme config
│ └── lumen/ # Lumen Desktop Shell config
└── packages/
├── forge/ # TUI installer and system management tool
├── plymouth-cybex/ # Custom Plymouth theme
└── hyprland-sessions/ # Session .desktop files
NetworkManager should work automatically. If not:
nmtuiThere is no recovery option. You'll need to reinstall.
Edit modules/disko/<hostname>.nix and update the device path, then reinstall.
MIT