Installer: cleanup of the lazy Nix removal and install --clone

- The nix.mount drop-in is also removed when the uninstall fails or is
  interrupted (exit trap), and when daemon-reload failed after writing it.
- --dir with a trailing slash no longer puts the temporary clone inside
  the directory it replaces.
- The template's repository uses Nix's git when SteamOS has none, so the
  template marker exists there too (--clone needs it).
- A failed Nix uninstall during the reinstall of a broken Nix says so.
- clone_config: one branch per case; shorter comments, help and docs.
- Tests: an interrupted uninstall, --dir with a trailing slash; a
  redundant "used as it is" case dropped.
This commit is contained in:
Pierre Kisters committed 2026-10-01 23:32:51 +02:00
1 parent 85523b63ad
commit 18c261a0a7
5 files changed
+98 -116

No files matched your search

+2 -3
View File
@@ -10,9 +10,8 @@
programs.home-manager.enable = true; # the `home-manager` command
# git credentials for HTTPS (`install.sh install --clone` uses them):
# GitHub through the GitHub CLI (log in once: gh auth login, works with
# 2FA), other hosts from ~/.git-credentials. git itself is SteamOS's;
# Home Manager only writes its config. Remove to manage git yourself.
# github.com through the GitHub CLI (gh auth login), other hosts from
# ~/.git-credentials. git is SteamOS's; Home Manager writes its config.
programs.git = {
enable = true;
package = null;