From 6e0d17b859352682581bdfee09ec140312efcf0b Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Tue, 19 May 2026 18:46:30 +0100 Subject: [PATCH] fix(welcome): drop Step 4's dead starter home.nix generation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `nomarchy-welcome` wrote a "starter" `~/.config/home-manager/home.nix` for users without one. Two problems: 1. Wrong path. The installer-generated canonical home.nix lives at `/etc/nixos/home.nix` and is imported via the flake (both home-manager.users and the standalone homeConfigurations). Nothing in the installer flow ever reads `~/.config/home-manager/home.nix` — it's a dead file. 2. Broken content. The starter is missing `home.username`, `home.homeDirectory`, `home.stateVersion`, and doesn't import `nomarchy.nixosModules.home`. Even on a hand-migration path it wouldn't evaluate as a standalone HM config. So in the installer flow it's dead, and in the migration flow it's broken. Removed Step 4 entirely. The git-init step (was Step 5) is now Step 4. Hand-migrated users follow `docs/MIGRATION.md`, which has the correct home.nix template. Found during Pillar 8 audit of first-boot UX. --- features/scripts/utils/nomarchy-welcome | 36 +++---------------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/features/scripts/utils/nomarchy-welcome b/features/scripts/utils/nomarchy-welcome index 4ce78f6..bf30367 100755 --- a/features/scripts/utils/nomarchy-welcome +++ b/features/scripts/utils/nomarchy-welcome @@ -59,39 +59,9 @@ if [[ "$USER" == "nixos" ]]; then exit 0 fi -# 4. Starter home.nix +# 4. Setup Local Repo (Crucial for nomarchy-env-update to work) echo "" -echo "Step 4: Starter home.nix" -HOME_NIX="$HOME/.config/home-manager/home.nix" -if [ ! -f "$HOME_NIX" ]; then - echo "It looks like you don't have a ~/.config/home-manager/home.nix file yet." - echo "Nomarchy uses this file to manage your user-level packages and settings." - if gum confirm "Would you like to generate a starter home.nix?"; then - mkdir -p "$(dirname "$HOME_NIX")" - cat < "$HOME_NIX" -{ pkgs, ... }: -{ - # Nomarchy starter home.nix - # Add your user packages here. - home.packages = with pkgs; [ - btop - fastfetch - chromium - # Add more packages here - ]; - - # home.stateVersion = "25.11"; # Consult docs/MIGRATION.md if you change this -} -EOF - echo "Starter home.nix generated at $HOME_NIX" - fi -else - echo "Detected existing home.nix at $HOME_NIX. Skipping generation." -fi - -# 5. Setup Local Repo (Crucial for nomarchy-env-update to work) -echo "" -echo "Step 5: Git Repository Check" +echo "Step 4: Git Repository Check" echo "Nomarchy relies on a local git repository for declarative updates." if [ ! -d "/etc/nixos/.git" ]; then echo "Warning: /etc/nixos is not a git repository. Declarative updates might fail." @@ -102,7 +72,7 @@ if [ ! -d "/etc/nixos/.git" ]; then fi fi -# 6. Success +# 5. Success echo "" echo "Applying all changes..." nomarchy-env-update