-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make flake git repo configurable in the setup script
- Loading branch information
Showing
2 changed files
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,7 +152,7 @@ After rebooting proceed with the [next section](#nixos-config-setup). | |
#### NixOS config setup | ||
```bash | ||
$ sudo nix run github:rake5k/nixcfg#setup | ||
$ sudo nix run github:rake5k/nixcfg#setup -- [email protected]:rake5k/nixcfg.git | ||
``` | ||
### Non-NixOS | ||
|
@@ -171,7 +171,7 @@ sh <(curl -L https://nixos.org/nix/install) --no-channel-add --no-modify-profile | |
```bash | ||
# Set up this Nix configuration | ||
nix run github:rake5k/nixcfg#setup | ||
nix run github:rake5k/nixcfg#setup -- [email protected]:rake5k/nixcfg.git | ||
# set login shell | ||
chsh -s /bin/zsh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,10 @@ source @bashLib@ | |
|
||
export -f _log | ||
|
||
### Gather flake info | ||
|
||
readonly FLAKE_GIT_REPO="${1}" | ||
|
||
nix_config="@flakePath@" | ||
export nix_config | ||
|
||
|
@@ -27,8 +31,9 @@ _clone() { | |
} | ||
|
||
# clone repos | ||
# shellcheck disable=SC2310 | ||
if ! _is_nixos || _is_root; then | ||
_clone "nix-config" [email protected]:rake5k/nixcfg.git "${nix_config}" | ||
_clone "nix-config" "${FLAKE_GIT_REPO}" "${nix_config}" | ||
fi | ||
|
||
# generage age key | ||
|
@@ -93,6 +98,7 @@ _setup_nix() { | |
fi | ||
} | ||
|
||
# shellcheck disable=SC2310 | ||
if _is_nixos && _is_root; then | ||
_setup_nixos | ||
elif ! _is_nixos && ! _is_root; then | ||
|