diff options
| author | Ryan Schanzenbacher <ryan@rschanz.org> | 2026-08-03 01:33:39 -0400 |
|---|---|---|
| committer | Ryan Schanzenbacher <ryan@rschanz.org> | 2026-08-03 01:33:39 -0400 |
| commit | 22e588d2f7dc164806f01511b46a52d6e6852505 (patch) | |
| tree | d9655e82de492d1f473b39bb0caefeeea5415e7e | |
| parent | 0c8fa3a2a270747f3dbb54fe8792f3f0aec997e3 (diff) | |
Document git-submodule wiring into guix-dotfiles in MIGRATION.md
| -rw-r--r-- | MIGRATION.md | 58 |
1 files changed, 43 insertions, 15 deletions
diff --git a/MIGRATION.md b/MIGRATION.md index 0e3f7f4..92f6392 100644 --- a/MIGRATION.md +++ b/MIGRATION.md | |||
| @@ -5,28 +5,56 @@ home-manager flake guix-dotfiles was already using) and pulls Linux desktop | |||
| 5 | config that used to live in `guix-dotfiles/home-config/home-configuration.scm` | 5 | config that used to live in `guix-dotfiles/home-config/home-configuration.scm` |
| 6 | into home-manager proper. It does **not** replace Guix itself: package | 6 | into home-manager proper. It does **not** replace Guix itself: package |
| 7 | management, the system config, and three specific home services stay in | 7 | management, the system config, and three specific home services stay in |
| 8 | Guix (see "Stays in Guix" below). Nothing in `guix-dotfiles` has been edited | 8 | Guix (see "Stays in Guix" below). |
| 9 | by this migration - the changes below are for you to apply by hand. | ||
| 10 | 9 | ||
| 11 | ## 1. Point `home-manager` at this repo | 10 | `nix-combined` is deliberately its own repo (own history, own remote) so |
| 11 | that darwin machines never need to clone anything guix-related. It's wired | ||
| 12 | into `guix-dotfiles` as a **git submodule** at | ||
| 13 | `guix-dotfiles/home-config/nix-combined` - the rest of this section covers | ||
| 14 | that wiring; everything after "Stays in Guix" is still a plan for you to | ||
| 15 | apply by hand. | ||
| 12 | 16 | ||
| 13 | In `guix-dotfiles/home-config/home-configuration.scm`, `%home-symlinks` | 17 | ## 1. Submodule wiring (already done in this working tree) |
| 14 | currently has: | ||
| 15 | 18 | ||
| 16 | ```scheme | 19 | Already applied, not yet committed/pushed - review with `git status`/`git |
| 17 | (".config/guix/home-config/nix-home-manager" ".config/home-manager") | 20 | diff` in `guix-dotfiles` before committing: |
| 18 | ``` | ||
| 19 | 21 | ||
| 20 | Change the target to wherever you clone `nix-combined`, e.g.: | 22 | - `guix-dotfiles/.gitmodules` added, pointing `home-config/nix-combined` at |
| 23 | **the local filesystem path** to this checkout of `nix-combined`. That | ||
| 24 | only works on this machine. **Before pushing**, create the real remote | ||
| 25 | (recommend `https://git.rschanz.org/nix-combined`, matching the | ||
| 26 | `nix-dotfiles`/`guix-dotfiles` naming convention) and push `nix-combined` | ||
| 27 | there, then run, from `guix-dotfiles`: | ||
| 28 | ``` | ||
| 29 | git submodule set-url home-config/nix-combined https://git.rschanz.org/nix-combined | ||
| 30 | git add .gitmodules | ||
| 31 | git commit | ||
| 32 | ``` | ||
| 33 | - `home-configuration.scm`'s `%home-symlinks` now points | ||
| 34 | `.config/guix/home-config/nix-combined` at `.config/home-manager` | ||
| 35 | (previously `.config/guix/home-config/nix-home-manager`). | ||
| 36 | - `deploy.sh`'s fresh-install clone now uses `git clone --recurse-submodules` | ||
| 37 | so a from-scratch deploy pulls `nix-combined` in the same step. | ||
| 21 | 38 | ||
| 22 | ```scheme | 39 | **On existing machines**, after pulling this change: |
| 23 | ("/path/to/nix-combined" ".config/home-manager") | 40 | ``` |
| 41 | git submodule update --init --recursive | ||
| 42 | ``` | ||
| 43 | (or `git clone --recurse-submodules` next time you clone `guix-dotfiles` | ||
| 44 | fresh). Then switch with `home-manager switch --flake ~/.config/home-manager#ryan` | ||
| 45 | (the `rebuild` zsh alias does this on Linux). | ||
| 46 | |||
| 47 | **Updating `nix-combined` later**: since the submodule pins an exact commit, | ||
| 48 | pulling new `nix-combined` changes needs a bump in `guix-dotfiles`: | ||
| 49 | ``` | ||
| 50 | cd home-config/nix-combined && git pull origin main && cd - | ||
| 51 | git add home-config/nix-combined | ||
| 52 | git commit -m "bump nix-combined" | ||
| 24 | ``` | 53 | ``` |
| 25 | 54 | ||
| 26 | Then switch with `home-manager switch --flake ~/.config/home-manager#ryan` | 55 | The old `guix-dotfiles/home-config/nix-home-manager` directory (the |
| 27 | (the `rebuild` zsh alias does this on Linux). The old | 56 | pre-submodule ad-hoc flake) can be deleted once you've confirmed the new |
| 28 | `guix-dotfiles/home-config/nix-home-manager` directory can be deleted once | 57 | one builds and switches cleanly. |
| 29 | you've confirmed the new flake builds and switches cleanly. | ||
| 30 | 58 | ||
| 31 | **Leave the `nix-config` symlink entry alone for the first switch.** It's | 59 | **Leave the `nix-config` symlink entry alone for the first switch.** It's |
| 32 | what sets `experimental-features = nix-command flakes` for your user today, | 60 | what sets `experimental-features = nix-command flakes` for your user today, |
