Moving from CachyOS to NixOS
The install wipes the whole NVMe drive (nvme0n1, the 980 PRO) and lays it out
again with disko, as hosts/desktop/disko.nix describes. CachyOS and everything
in it are gone afterwards, so your home folder goes to the Kingston SATA SSD
(sda) first and comes back after the install. Game installs aren't backed up
(see backup-filter): Steam games and WoW download again. WoW's settings and
addons are kept.
The other SATA SSD (sdb) isn't touched at any point. disko only knows the
NVMe drive, by its serial number.
1. Before you start (on CachyOS)
- Push this repo and the latest
Eiziv/philly. - Get the NixOS installer (26.05, minimal is enough) on a USB stick, and make sure Secure Boot is off in the firmware, as it is for Limine now.
- Optional, but this is the last chance: record WoW's performance on
CachyOS, to compare with NixOS later. In Faugus, edit Battle.net, turn
on MangoHud and add this line to the launch arguments:
MANGOHUD_CONFIG=read_cfg,output_folder=/home/vizie/benchmarks,log_duration=60,log_interval=0. In game, stand somewhere you can return to (a busy city), keep the camera still and press Left Shift+F2. Do it three times. The logs land in~/benchmarks, which the backup includes. Do the same on NixOS later, then compare the two with~/git/dot/tools/bench-compare.
The backup can be made ahead of time, days before the install if you like. Right before the wipe you run the two rsync commands below again (and the "save the built system" step, if the config changed since); they only copy what changed, so that takes a minute or two.
tools/backup-to-sata does all of the steps below in one go (run it with
sudo; it only formats the Kingston if it is empty). They are spelled out here
too, in case you'd rather do them by hand.
Prepare the backup drive (once). This erases sda, the 112 GB Kingston, which
is empty now. Check that the name points at sda first:
Save the built system. The finished system and the disko script go onto the backup drive, so the installer doesn't have to build anything (or compile the CachyOS kernel, if its binary cache is still down):
sys=
disko=
Back up WoW's settings and addons (WTF is keybinds, macros and addon
settings, Interface is the addons):
Back up your home folder. Quit Signal, Discord, Firefox, Claude and the
games first, so their databases aren't copied halfway through a write. About
83 GB before compression, and the saved system adds roughly 10 GB, so it fits
the 112 GB drive with some room. If it runs out of space, leave out repos that
are pushed to GitHub (the biggest are git/skate3, 23 GB, and git/philly,
16 GB) with an extra --exclude=/git/skate3/:
Check that it looks complete (ls -a /mnt/backup/vizie, du -sh /mnt/backup/*),
then sudo umount /mnt/backup. To update the backup later, mount it again
(sudo mount -o compress=zstd /dev/disk/by-label/backup /mnt/backup) and rerun
the commands above.
2. Install
Boot the installer. Wired network works out of the box; the install itself doesn't need it.
# The backup drive, read-only. Not under /mnt: disko unmounts everything there.
sys=
disko=
# The disko script. It doesn't ask before it wipes, so check that the drive it
# names is the 980 PRO (nvme0n1) one last time.
# Wipe, partition, format and mount the NVMe drive at /mnt.
# Copy the system onto it and install it, with the boot loader.
# It asks for a root password at the end.
# Your home folder back, owned by you (uid 1000, group users).
If something in /backup/nix-cache is missing, install from the flake instead
(this needs the network, and compiles the kernel if its cache is down):
nixos-install --flake /backup/vizie/git/dot#desktop after
nix run github:nix-community/disko/latest -- --mode destroy,format,mount /backup/vizie/git/dot/hosts/desktop/disko.nix.
3. First boot
- The login screen is the same gtkgreet over the blurred wallpaper.
- Home Manager replaces the old symlinks in
~/.config(pointing into~/git/dotfiles) with its own. The old ones are kept beside them with a.pre-nixossuffix, so nothing is overwritten. - Bolt installs from Flathub in the background on the first boot with network
(
systemctl status flatpak-bolt). - "Command not found" suggestions need nix-index's database once:
nix-index(takes a few minutes). - Check the background programs:
systemctl --user list-units --type=service.
4. What changed
What is different from CachyOS, all on purpose:
- Packages are generic x86-64 builds, apart from the kernel (Zen 4) and proton-cachyos (x86-64-v3). CachyOS rebuilds everything for v3/v4.
- Snapper root snapshots are replaced by NixOS generations: each rebuild is
a boot menu entry.
/homewas never snapshotted on CachyOS either. - GTK theme: set in
modules/home/theming.nix. nwg-look can't save over those files any more. - Signal theme is built into the package: edit,
rebuild,config/signal/restart. - Bitwarden autostart: the same XDG autostart entry, with NixOS's program name.
- fish: only CachyOS's default fish config was there, and your shell is zsh, so fish isn't set up.
- vkBasalt's ReShade shaders in
~/.config/vkBasalt/reshade-shadersstay in your home folder; they aren't in this repo (vkBasalt.conf doesn't use them). - vkSumi: its config is kept, but the layer itself wasn't installed on CachyOS (there is no nixpkgs package for it either).
Unchanged on purpose, but worth knowing:
- kitty's font: kitty.conf asks for JetBrains Mono, which was never
installed, so kitty has been showing Noto Sans Mono. That's kept. Add
nerd-fonts.jetbrains-monotofonts.packagesinmodules/nixos/desktop.nixto get the font the config names. - The login screen opens a kitty terminal behind gtkgreet
(
hl.exec_cmd("kitty")inconfig/greetd/hyprland.lua), running as the greeter user. If gtkgreet ever crashed, that shell would be on screen before anyone logs in. If it's a leftover from debugging, delete that line. ~/.ssh/authorized_keyshas a key labelledchris@echoz.io, which lets that key log in as you over SSH (port 22 is open, as before). It stays in your home folder.- mDNS (port 5353) stays closed in the firewall, as ufw had it.
- sched-ext schedulers stay off, as before. See the comment in
modules/nixos/cachyos.nixto try one.
5. Games
Steam: your settings, Proton versions and game saves (
compatdata) are back. The games in~/Games/SteamLibraryand Steam's own library show as not installed; install them again. Steam may need the library folder re-added (Settings → Storage).WoW: in Faugus, remove the old Battle.net entry and add Battle.net again (Faugus installs it into a new prefix at
~/Games/battlenet). Pick the same runner,Proton-CachyOS Latest(it's back in~/.local/share/Steam/compatibilitytools.d), and the same launch arguments:WINE_SIMULATE_WRITECOPY=1andPROTON_ENABLE_WAYLAND=0. Install WoW, then copy your settings and addons back before you start it:OSRS: Bolt installs itself again (see First boot); its data in
~/.var/app/com.adamcake.Boltcame back with your home folder, so you stay signed in.
6. Once you're happy
The backup on sda stays until you need the drive for something else. NixOS
doesn't mount it; sudo mount /dev/disk/by-label/backup /mnt gets you into it.