From 22e588d2f7dc164806f01511b46a52d6e6852505 Mon Sep 17 00:00:00 2001 From: Ryan Schanzenbacher Date: Mon, 3 Aug 2026 01:33:39 -0400 Subject: Document git-submodule wiring into guix-dotfiles in MIGRATION.md --- MIGRATION.md | 64 +++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 46 insertions(+), 18 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 config that used to live in `guix-dotfiles/home-config/home-configuration.scm` into home-manager proper. It does **not** replace Guix itself: package management, the system config, and three specific home services stay in -Guix (see "Stays in Guix" below). Nothing in `guix-dotfiles` has been edited -by this migration - the changes below are for you to apply by hand. - -## 1. Point `home-manager` at this repo - -In `guix-dotfiles/home-config/home-configuration.scm`, `%home-symlinks` -currently has: - -```scheme -(".config/guix/home-config/nix-home-manager" ".config/home-manager") +Guix (see "Stays in Guix" below). + +`nix-combined` is deliberately its own repo (own history, own remote) so +that darwin machines never need to clone anything guix-related. It's wired +into `guix-dotfiles` as a **git submodule** at +`guix-dotfiles/home-config/nix-combined` - the rest of this section covers +that wiring; everything after "Stays in Guix" is still a plan for you to +apply by hand. + +## 1. Submodule wiring (already done in this working tree) + +Already applied, not yet committed/pushed - review with `git status`/`git +diff` in `guix-dotfiles` before committing: + +- `guix-dotfiles/.gitmodules` added, pointing `home-config/nix-combined` at + **the local filesystem path** to this checkout of `nix-combined`. That + only works on this machine. **Before pushing**, create the real remote + (recommend `https://git.rschanz.org/nix-combined`, matching the + `nix-dotfiles`/`guix-dotfiles` naming convention) and push `nix-combined` + there, then run, from `guix-dotfiles`: + ``` + git submodule set-url home-config/nix-combined https://git.rschanz.org/nix-combined + git add .gitmodules + git commit + ``` +- `home-configuration.scm`'s `%home-symlinks` now points + `.config/guix/home-config/nix-combined` at `.config/home-manager` + (previously `.config/guix/home-config/nix-home-manager`). +- `deploy.sh`'s fresh-install clone now uses `git clone --recurse-submodules` + so a from-scratch deploy pulls `nix-combined` in the same step. + +**On existing machines**, after pulling this change: ``` +git submodule update --init --recursive +``` +(or `git clone --recurse-submodules` next time you clone `guix-dotfiles` +fresh). Then switch with `home-manager switch --flake ~/.config/home-manager#ryan` +(the `rebuild` zsh alias does this on Linux). -Change the target to wherever you clone `nix-combined`, e.g.: - -```scheme -("/path/to/nix-combined" ".config/home-manager") +**Updating `nix-combined` later**: since the submodule pins an exact commit, +pulling new `nix-combined` changes needs a bump in `guix-dotfiles`: +``` +cd home-config/nix-combined && git pull origin main && cd - +git add home-config/nix-combined +git commit -m "bump nix-combined" ``` -Then switch with `home-manager switch --flake ~/.config/home-manager#ryan` -(the `rebuild` zsh alias does this on Linux). The old -`guix-dotfiles/home-config/nix-home-manager` directory can be deleted once -you've confirmed the new flake builds and switches cleanly. +The old `guix-dotfiles/home-config/nix-home-manager` directory (the +pre-submodule ad-hoc flake) can be deleted once you've confirmed the new +one builds and switches cleanly. **Leave the `nix-config` symlink entry alone for the first switch.** It's what sets `experimental-features = nix-command flakes` for your user today, -- cgit v1.3.1