mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 04:04:16 +02:00
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:
1 parent
85523b63ad
commit
18c261a0a7
5 files changed
+98
-116
No files matched your search
@@ -94,16 +94,15 @@ Your own config in a git repository: `--clone <git-url>` clones it into
|
||||
`~/nix-config` (`--dir <path>`, branch `--ref <branch>`) and installs it like
|
||||
`--flake <dir>`. URLs: `git@github.com:owner/repo`, `https://...` or
|
||||
`github:owner/repo`. Without a Home Manager configuration it first activates
|
||||
the template, whose git credential helpers then clone a private repository:
|
||||
your GitHub CLI login (`~/.config/gh`, kept by `uninstall`) or
|
||||
`~/.git-credentials`; git never asks for a password. If the clone fails, it
|
||||
offers `gh auth login` (browser or one-time code, works with 2FA); an SSH URL
|
||||
uses your key instead. The clone then replaces the template. Keep the
|
||||
template's `programs.git`/`programs.gh` lines (see [Usage](#usage)) in your
|
||||
config, or the helpers go with the switch to it. Only a missing
|
||||
`~/nix-config` or the unchanged template is replaced by the clone; anything
|
||||
else there is used as it is, without cloning. So re-running continues where
|
||||
it stopped (after a failed switch it just switches again).
|
||||
the template, so a private repository clones with its git credential
|
||||
helpers: your GitHub CLI login (`~/.config/gh`, kept by `uninstall`) or
|
||||
`~/.git-credentials`, never a password prompt. If the clone fails, it offers
|
||||
`gh auth login` (browser or one-time code, works with 2FA); an SSH URL uses
|
||||
your key instead. Keep the template's `programs.git`/`programs.gh` lines
|
||||
(see [Usage](#usage)) in your config, or the helpers go with the switch to
|
||||
it. Only a missing `~/nix-config` or the unchanged template is replaced by
|
||||
the clone; anything else there is used as it is. So re-running continues
|
||||
where it stopped (after a failed switch it just switches again).
|
||||
|
||||
```sh
|
||||
curl -fsSL https://steam-frame-nix.lhns.de | bash -s -- install --clone git@github.com:owner/my-config
|
||||
|
||||
Reference in new issue
Block a user