Pulls in the RTL8821CU WiFi/Bluetooth blobs (and other devices). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
nixos-pc
NixOS flake for the desktop PC: Hyprland with end-4's illogical-impulse via soymou/illogical-flake, NVIDIA RTX 3080, Steam/gaming, dev tools.
- Host:
nixos-pc· User:zephrynis· Channel: nixos-unstable - Boot: systemd-boot on this install's own ESP on the 1TB WD SSD; rEFInd (on the 2TB NVMe's ESP) remains the top-level OS picker and auto-detects it.
hosts/nixos-pc/ host wiring, bootloader, user, hardware config
modules/ core, desktop (hyprland/sddm/fonts), nvidia, gaming
home/zephrynis.nix illogical-impulse + git/direnv/vscode/CLI tools
Rebuild after changes: sudo nixos-rebuild switch --flake .#nixos-pc
Update inputs (one at a time is safer): nix flake update <input>
Install procedure
Target: ~250GB shrunk from the work-Windows partition on the 1TB WD SA500 SATA SSD. The work Windows on that disk and everything on the 2TB NVMe (other Windows, Arch, rEFInd's ESP) must not be touched.
1. Prep (from the work Windows)
- Back up anything important. If BitLocker is enabled on C:, export the recovery key and suspend BitLocker before repartitioning.
- Disable Fast Startup:
powercfg /h off(admin) — otherwise NTFS is left dirty. - Shrink C: by ~256000 MB: Disk Management → right-click C: → Shrink Volume. If it won't shrink enough (unmovable files): temporarily disable pagefile + System Restore on C:, reboot, retry, re-enable after.
- Push this repo somewhere reachable from the ISO (GitHub) or copy to a USB stick. Flakes only evaluate git-tracked files — commit everything.
- BIOS: disable Secure Boot (stock NixOS bootloader is unsigned). F11 = one-time boot menu.
2. Partition & install (NixOS ISO, UEFI mode)
ls /sys/firmware/efi # must exist (UEFI mode)
lsblk -o NAME,SIZE,FSTYPE,LABEL,MODEL # identify disks
The 1TB WD (WDS100T1R0A) is likely /dev/sda. Do not touch any NTFS partition, and nothing on the NVMe. In the ~250G free space (parted unit GiB, print free to see exact bounds):
parted /dev/sda -- mkpart ESP fat32 <freeStart> <freeStart+1GiB>
parted /dev/sda -- set <N> esp on
parted /dev/sda -- mkpart root ext4 <freeStart+1GiB> 100%
mkfs.fat -F 32 -n NIXBOOT /dev/sdaX # the new 1GiB partition
mkfs.ext4 -L nixos /dev/sdaY # the new large partition
mount /dev/disk/by-label/nixos /mnt
mkdir -p /mnt/boot
mount -o umask=0077 /dev/disk/by-label/NIXBOOT /mnt/boot
Get the flake and the real hardware config:
git clone <this-repo-url> /mnt/etc/nixos # or copy from USB
nixos-generate-config --root /mnt
mv /mnt/etc/nixos/hardware-configuration.nix /mnt/etc/nixos/hosts/nixos-pc/hardware-configuration.nix
rm /mnt/etc/nixos/configuration.nix
git -C /mnt/etc/nixos add -A
Install (needs network — ethernet just works, else nmtui):
nixos-install --flake /mnt/etc/nixos#nixos-pc # sets root password at the end
nixos-enter --root /mnt -c 'passwd zephrynis'
reboot
3. After first boot
- rEFInd should show a new NixOS/systemd-boot entry (it scans all ESPs). Windows and Arch entries must still work.
- If the firmware now boots straight into systemd-boot instead of rEFInd, fix the order from NixOS:
efibootmgrto list,sudo efibootmgr -o XXXX,YYYY,...with rEFInd first. - Optional rEFInd polish (edit
refind.confon the NVMe ESP): amenuentrystanza for a custom NixOS name/icon, anddont_scan_files/dont_scan_dirsto hide duplicate auto-detected kernel entries from the NIXBOOT ESP. - Checks:
nvidia-smi;cat /sys/module/nvidia_drm/parameters/modeset→Y; Hyprland session in SDDM; quickshell bar appears (Super for launcher); Steam runs a Proton title.- If the
qs(quickshell) binary is missing, addinputs.illogical-flake.inputs.quickshell.packages.x86_64-linux.defaulttohome.packagesand rebuild. - Cursor invisible/glitchy: enable Hyprland
cursor:no_hardware_cursors = true, or the commentedWLR_NO_HARDWARE_CURSORSfallback inmodules/nvidia.nix.
- If the
Follow-up (someday): separate rEFInd entries for the two Windows installs
Both Windows currently share one Windows Boot Manager/BCD on the NVMe ESP, so rEFInd shows a single Windows entry with a second picker behind it. The new ESP on the 1TB SSD makes splitting easy:
- From the work Windows, assign the NIXBOOT ESP a letter (e.g.
S:viadiskpart→assign), then:bcdboot C:\Windows /s S: /f UEFIThis creates an independent Windows Boot Manager + BCD on the 1TB SSD's ESP that boots only the work OS. 1GiB is plenty for both this and NixOS's kernels. - rEFInd then shows two distinct Windows Boot Manager entries (one per ESP).
- Remove the work OS's entry from the old shared BCD (
msconfig→ Boot tab, orbcdedit /delete <id>) so each menu boots exactly one Windows.