summaryrefslogtreecommitdiff
path: root/MIGRATION.md
diff options
context:
space:
mode:
Diffstat (limited to 'MIGRATION.md')
-rw-r--r--MIGRATION.md221
1 files changed, 221 insertions, 0 deletions
diff --git a/MIGRATION.md b/MIGRATION.md
new file mode 100644
index 0000000..0e3f7f4
--- /dev/null
+++ b/MIGRATION.md
@@ -0,0 +1,221 @@
1# Migrating guix-dotfiles onto nix-combined
2
3This repo supersedes `guix-dotfiles/home-config/nix-home-manager` (the ad-hoc
4home-manager flake guix-dotfiles was already using) and pulls Linux desktop
5config that used to live in `guix-dotfiles/home-config/home-configuration.scm`
6into home-manager proper. It does **not** replace Guix itself: package
7management, the system config, and three specific home services stay in
8Guix (see "Stays in Guix" below). Nothing in `guix-dotfiles` has been edited
9by this migration - the changes below are for you to apply by hand.
10
11## 1. Point `home-manager` at this repo
12
13In `guix-dotfiles/home-config/home-configuration.scm`, `%home-symlinks`
14currently has:
15
16```scheme
17(".config/guix/home-config/nix-home-manager" ".config/home-manager")
18```
19
20Change the target to wherever you clone `nix-combined`, e.g.:
21
22```scheme
23("/path/to/nix-combined" ".config/home-manager")
24```
25
26Then switch with `home-manager switch --flake ~/.config/home-manager#ryan`
27(the `rebuild` zsh alias does this on Linux). The old
28`guix-dotfiles/home-config/nix-home-manager` directory can be deleted once
29you've confirmed the new flake builds and switches cleanly.
30
31**Leave the `nix-config` symlink entry alone for the first switch.** It's
32what sets `experimental-features = nix-command flakes` for your user today,
33which is what lets `home-manager`/`nix` read this flake at all -
34home-manager can't bootstrap its own prerequisite. `linux.nix` now writes
35its own `~/.config/nix/nix.conf` and `~/.config/nix/registry.json` via
36`xdg.configFile`, so *after* the first successful switch, remove the
37`nix-config` entry from `%home-symlinks` too - otherwise HM's files resolve
38through that symlink and land as untracked files inside the guix-dotfiles
39checkout instead of in the Nix store.
40
41## 2. Remove entries `home-configuration.scm` now duplicates
42
43Once nix-combined delivers a path, Guix must stop also writing it, or
44activation will collide (two things trying to own the same symlink target).
45In `home-configuration.scm`'s `home-xdg-configuration-files-service-type` and
46`home-files-service-type`, remove these lines (nix-combined now owns them):
47
48- `"nvim/init.vim"`, `"nvim/after/ftplugin/markdown/custom.vim"`,
49 `"nvim/after/ftplugin/mail/custom.vim"` - nix-combined's neovim config
50 (lazy.nvim-based, in `users/ryan/modules/nvim`) is the canonical one now;
51 the old vim-plug based `nvim/config/init.vim` + `plug.vim` is superseded.
52- `"hypr/monitors.conf"`, `"hypr/pyprland.toml"`, `"hypr/family_guy.mp4"`,
53 `"hypr/hyprlock.conf"`, `"hypr/hypridle.conf"`, `"hypr/kanshi.conf"`,
54 `"hypr/subwaysurfer.webm"`, `"hypr/scripts"` (the `hyprland.conf` itself
55 was already coming from the old nix-home-manager flake, unchanged in
56 spirit here - just re-homed)
57- `"wpaperd"`, `"mpv"`, `"foot"`, `"waybar"`, `"alacritty"`, `"aerc"`
58- `"pulse/client.conf"`
59- `.local/share/nvim/site/autoload/plug.vim` (dead once nvim is lazy.nvim-based)
60- `.local/share/mailvelope`, `.mozilla/native-messaging-hosts/tridactyl.json`,
61 `.local/share/tridactyl`
62- **`.icons`** (from `home-files-service-type`) - this one isn't optional
63 cleanup, it's a hard prerequisite. Guix delivers `.icons` today as a
64 single recursive `local-file` symlink, but `linux.nix`'s
65 `home.pointerCursor` (with `x11.enable = true`) needs to write
66 `~/.icons/default/index.theme` itself. With the old symlink still in
67 place, HM can't create a file inside a symlinked-to-store directory and
68 activation fails outright. Remove this entry before your first
69 `home-manager switch`.
70- `.gitconfig` (nix-combined's `programs.git` now owns this, with the
71 `filter.lfs` and `[sendemail]` sections merged in - they existed in
72 guix-dotfiles' `.gitconfig` but were missing from the old nix-dotfiles config)
73- `.ssh/config` (same story - nix-combined's `programs.ssh.settings` is a
74 strict superset: added the `linode` host, the `192.168.216.1`
75 legacy-algorithm host, the `KexAlgorithms` exclusion on `Host *`, and the
76 `Match host * exec "gpg-connect-agent ..."` line)
77- `.docker/cli-plugins` (docker-compose plugin - if you still want this,
78 it's cheap to add to `users/ryan/linux.nix`'s `home.file`; it wasn't
79 carried over because nothing else referenced it and I didn't want to
80 guess at whether you still use it)
81
82`hypr/Wallpapers` and the sway config were left alone deliberately - you said
83you'd handle wallpapers yourself, and `sway` isn't referenced by anything
84active (Hyprland is the real WM; see "Dead/unused" below).
85
86## 3. Switch the login shell to zsh
87
88`guix-dotfiles/modules/ryan-config/base-system.scm`'s `base-operating-system`
89has:
90
91```scheme
92;(shell (file-append zsh "/bin/zsh"))
93```
94
95commented out, so your account's login shell is still bash even though the
96canonical config (nix-dotfiles, and now nix-combined) is zsh. Uncomment that
97line (and rebuild/reconfigure the system) so `programs.zsh` in
98`users/ryan/common.nix` is actually what runs on login. Until you do, bash
99still runs (Guix's `home-bash-service-type` config, if still present, keeps
100working - just don't remove it from `home-configuration.scm` until the shell
101is actually switched, or you'll drop to a shell with no rc file at all).
102
103## Stays in Guix - no home-manager equivalent without systemd
104
105Home-manager's `services.*` modules assume a systemd user session to
106autostart things (or launchd on macOS). Guix uses shepherd instead, and
107home-manager has no shepherd backend. These three keep running exactly as
108they do today, defined in `guix-dotfiles/modules/ryan-services/`:
109
110- **`home-pipewire-service-type`** (pipewire + wireplumber daemons)
111- **`home-dbus-service-type`** (per-user session dbus, since Guix has no
112 systemd --user to provide one)
113- **`downloads-garbage-collector-service-type`** (the weekly Downloads
114 cleanup shepherd timer)
115
116`home-gpg-agent-service-type` is the one service that *did* migrate cleanly:
117gpg-agent doesn't need a supervisor. It's socket-activated the same way on
118both platforms via the zsh init in `common.nix`
119(`gpgconf --launch gpg-agent` + exporting `SSH_AUTH_SOCK`), which is exactly
120what nix-dotfiles' darwin config already did. `linux.nix` points
121`services.gpg-agent.pinentry.package` at nixpkgs' `pinentry-qt` rather than
122Guix's system profile path, so it isn't cross-dependent on Guix.
123
124`home-spotifyd-service-type` is already commented out/disabled in
125`home-configuration.scm` - nothing to do there.
126
127## Dead/unused - candidates to delete from guix-dotfiles
128
129Found while comparing the two repos; none of these are referenced by
130anything active, so nothing carried them into nix-combined:
131
132- **fish** (`home-config/fish/`) - the `fish` package is commented out of
133 `home-configuration.scm`'s package list, but the dotfiles are still
134 checked in. Orphaned.
135- **`.nix-channels`** - classic (non-flake) nix-channel file. Now that
136 everything is flake-based, this shouldn't be needed.
137- **`icons/XCursor-Pro-Dark*`** - not referenced anywhere; only
138 `Bibata-Modern-*` appears in `hypr/hyprland.conf`.
139- **`fonts/Fira Code`, `fonts/Lilex`, `fonts/Monofur For Powerline`,
140 `fonts/AnonymicePro`, `fonts/MonofurNerdFont`** - superseded by
141 `nerd-fonts.{fira-code,lilex,anonymice,monofur}` from nixpkgs
142 (`linux.nix`'s `home.packages`), which ship the same font families.
143- **`home-spotifyd-service-type`** usage - already disabled.
144- **`alacritty`** - config exists in both repos, but no package installs the
145 `alacritty` binary in either the guix or the old nix-home-manager config.
146 `foot` is what's actually wired into the system (Guix package list,
147 kmscon login). I added `pkgs.alacritty` to `linux.nix` so the config isn't
148 dead weight, but confirm whether you still use it - if not, drop both the
149 package and `users/ryan/linux/alacritty/`.
150- **`sway` config** - not referenced by anything; Hyprland (via
151 home-manager) is the actual compositor in use.
152
153## Additive merges (things nix-dotfiles was missing, now fixed)
154
155- **aerc**: `signature_personal`, `signature_rit_personal`,
156 `templates/quoted_reply`, `templates/thanks` existed only in
157 guix-dotfiles' aerc config, even though `accounts.conf`/`aerc.conf`
158 already referenced them by path. Copied into `users/ryan/aerc/`.
159- **git**: `filter.lfs` and `[sendemail]` sections, merged into
160 `common.nix`'s `programs.git.settings`.
161- **ssh**: `linode`, `192.168.216.1` (legacy host key/pubkey algorithms),
162 the `KexAlgorithms` exclusion, and the `Match host * exec ...` line,
163 merged into `common.nix`'s `programs.ssh`.
164
165## Linux desktop stack re-pin (see also the flake-version conversation)
166
167The old `guix-dotfiles/home-config/nix-home-manager/flake.nix` pinned
168home-manager to a 2024 commit specifically so it'd match separately-pinned
169`hyprland`/`hyprlock`/`hyprpicker`/`wpaperd` flake inputs (plus a
170`ryan77627/nixGL` fork and a `rust-overlay` pin for wpaperd). Sharing
171`common.nix` with the darwin config (which tracks home-manager master)
172required moving Linux onto the same nixpkgs/home-manager as darwin.
173
174The good news: current nixpkgs-unstable now packages `hyprland` (0.52.2),
175`hyprlock`, `hypridle`, `hyprpicker`, `wpaperd`, `kanshi`, and `pyprland`
176directly, so those five extra flake inputs (and the rust-overlay pin) are
177gone entirely - `linux.nix` just uses `pkgs.hyprland` etc. Only two
178Linux-specific flake inputs remain in `flake.nix`:
179
180- `nixgl` (still needed - it exists specifically to patch Guix's mesa/GL
181 mismatch, unrelated to nixpkgs version)
182- `clipboard-sync` (not in nixpkgs)
183
184**Dropped**: the `hypr-dynamic-cursors` Hyprland plugin (animated cursor
185trails). It has no nixpkgs package and pinning a matching flake input just
186for one cosmetic plugin didn't seem worth the added re-pin risk. If you want
187it back, add it as a flake input with `inputs.nixpkgs.follows = "nixpkgs"`
188and pass it as a plugin in `wayland.windowManager.hyprland.plugins`.
189
190**Dropped**: `mozff` (firefox-nightly flake) - unused. The
191`firefox-nightly` module's package line was already commented out in the
192guix config; it just configures `programs.firefox` (nixpkgs' own package).
193
194**Cursor theme changed**: the vendored `Bibata-Modern-Classic-Hyprland` /
195`Bibata-Modern-daed9-v1.0.2-x11` asset had oddly-versioned internal theme
196names from however that release was originally packaged. Replaced with
197nixpkgs' `bibata-cursors` (`home.pointerCursor` in `linux.nix`) - the
198`HYPRCURSOR_THEME`/`XCURSOR_THEME` env vars in `hyprland.conf` were updated
199to the plain name `Bibata-Modern-Classic` to match. nixpkgs' build doesn't
200have a `-Hyprland`-suffixed hyprcursor variant; Hyprland falls back to
201rendering the XCursor theme directly, which works fine, just without the
202optional cleaner hyprcursor rendering path.
203
204## Verification note
205
206`homeConfigurations.ryan` was checked with:
207
208```
209nix eval --raw .#homeConfigurations.ryan.activationPackage.drvPath
210```
211
212which forces full module evaluation (catches missing options and
213darwin-only packages referenced on Linux) without building anything.
214
215`darwinConfigurations.RyanMac` could not be evaluated on this machine (no
216aarch64-darwin builder). It was verified by structural diff instead:
217`flake.nix`'s darwin-facing inputs/outputs, `hosts/RyanMac/configuration.nix`,
218and `modules/darwin/random-wallpaper` are unchanged from `nix-dotfiles`;
219`common.nix`/`darwin.nix` reproduce `nix-dotfiles/users/ryan/home.nix`
220line-for-line except where noted above. Please run
221`darwin-rebuild build --flake .#RyanMac` yourself before switching for real.