dot
NixOS configuration for desktop: the CachyOS setup from
Eiziv/dotfiles, rewritten as a flake with
Home Manager. Hyprland (Lua config) under uwsm, the greetd/gtkgreet login screen,
the patched Waybar and the Eww control centre, the CachyOS kernel and the CachyOS
system tweaks.
Moving from CachyOS: see MIGRATION.md. The install wipes the NVMe drive and partitions it with disko.
Layout
flake.nix inputs, the desktop system, the packages below
hosts/desktop/ this machine: hostname, Home Manager
disko.nix the drive's partitions and btrfs subvolumes
modules/nixos/
base.nix Nix, boot, locale, network, firewall, user
cachyos.nix CachyOS kernel + cachyos-settings, file by file
nvidia.nix RTX 3080 Ti, open kernel module
desktop.nix Hyprland, uwsm, greetd, audio, Bluetooth, fonts
gaming.nix Steam, proton-cachyos, gamemode, gamescope, ...
apps.nix desktop apps, Claude Cowork, OpenDeck udev, Flatpak
vm.nix the test VM
modules/home/
files.nix links config/ into ~/.config (was symlink.sh)
services.nix desktop background programs as systemd user services
shell.nix zsh (as cachyos-zsh-config), git, gh, ssh
theming.nix GTK, cursor
packages.nix tools the scripts call; imsh-clients, philly
config/ the dotfiles themselves
pkgs/ packages not in nixpkgs, or patched
tools/bench-compare compares MangoHud logs from CachyOS and NixOS
Everyday use
Every rebuild is a boot menu entry, so a bad one is undone by picking the one before it.
Editing configs. ~/.config/hypr, waybar, kitty, dunst, fuzzel, nvim,
qt6ct, Kvantum, kdeglobals, the Philly theme, Firefox's user.js and
userChrome.css and ~/.p10k.zsh link straight to config/ in this checkout,
like the old symlink.sh did, so edits apply without a rebuild. (Set
dot.liveConfig = false to have them copied into the Nix store instead.) If the
checkout is not at ~/git/dot, set dot.repoPath.
Configs that programs write themselves (btop, micro, MangoHud/vkBasalt/vkSumi, mimeapps.list) are copied in only when missing and then left to
the program.
Signal theme. config/signal/theme.css is built into the Signal package
(pkgs/signal-desktop-themed), so after editing it run rebuild and then
config/signal/restart.
Background programs
Everything Hyprland used to start from hl.on("hyprland.start") is a systemd
user service now, started with graphical-session.target by uwsm and restarted
if it crashes:
| Service | |
|---|---|
waybar, hypridle, hyprpaper, dunst, hyprpolkitagent | the shell |
eww | control centre and notification flyouts |
blueman-applet, nm-applet, xembedsniproxy | tray (after Waybar) |
xwl-clipbridge | X11 → Wayland clipboard for Wine/Proton games |
autostart-apps | opens Signal, Discord, Faugus, OpenDeck and WowUp, each as its own unit |
hyprland.lua keeps only what has to live in the compositor: the startup window
rules that place those apps and hide WowUp's window.
Gaming
- Kernel:
linux-cachyos-latest-lto-zen4from xddxdd/nix-cachyos-kernel, the same build as CachyOS's znver4linux-cachyos(EEVDF, 1000 Hz, ThinLTO, Zen 4). - cachyos-settings: sysctl, I/O schedulers, THP, ntsync, limits, oomd, PCI latency,
ananicy-cpp with CachyOS's rules, bpftune; see
modules/nixos/cachyos.nix. proton-cachyosis installed for Steam under CachyOS's own internal name (proton-cachyos-slr), so Steam's existing choice of it still applies. ProtonPlus-installed tools in~/.steamcarry over as they are.- Launch options:
game-performance %command%,gamemoderun %command%,dlss-swapper %command%,mangohud %command%.
Not ported: CachyOS builds all its packages for x86-64-v3/v4; NixOS uses generic x86-64 builds outside the kernel and Proton. The difference in games is small.
Testing in a VM
Boots this exact system in QEMU, without NVIDIA and with the configs copied in. You land on the desktop; log out (Super+Delete) to see the login screen.
Custom packages
waybar | nixpkgs' Waybar with the three patches from the old PKGBUILD |
xembedsniproxy | standalone build from plasma-workspace 6.7.5, three patches |
signal-desktop-themed | Signal with config/signal/theme.css and a transparent window |
claude-desktop | Anthropic's official Linux .deb, repackaged |
opendeck | upstream release .deb, repackaged |
breezex-cursor | BreezeX-Black cursor theme |
proton-cachyos | CachyOS's Proton release, for Steam |
python3-desktop | Python with PyGObject and python-xlib for the scripts |
Each builds on its own, e.g. nix build .#waybar. The .deb-based ones and
proton-cachyos say at the top of their file how to update them.