diff options
| author | nsfisis <nsfisis@gmail.com> | 2023-09-04 09:26:36 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2023-09-04 09:26:36 +0900 |
| commit | daefded4d41bf9c09c6472d9126c9d369927076e (patch) | |
| tree | 69ca364084e4cf9916781b27b24784829dcd19cb /bootstrap.sh | |
| parent | 15b9254b3eabac6b6e6a4d3024c6cb39ee0ec3f5 (diff) | |
| download | dotfiles-daefded4d41bf9c09c6472d9126c9d369927076e.tar.gz dotfiles-daefded4d41bf9c09c6472d9126c9d369927076e.tar.zst dotfiles-daefded4d41bf9c09c6472d9126c9d369927076e.zip | |
home-manager: prepare setup on different host
Diffstat (limited to 'bootstrap.sh')
| -rwxr-xr-x | bootstrap.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bootstrap.sh b/bootstrap.sh index 641fac9..94cb202 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,5 +1,12 @@ #!/bin/sh +if [ $# != 1 ]; then + echo "Usage: $0 <host>" >&2 + echo "Availabel hosts:" >&2 + grep '= mkHomeConfiguration' flake.nix | cut -d '=' -f 1 | sed -e 's/^ */ * /' >&2 + exit 1 +fi + if [ ! -d .bootstrap ]; then mkdir .bootstrap fi @@ -20,5 +27,5 @@ fi if type home-manager > /dev/null 2>&1; then : else - nix run "nixpkgs#home-manager" -- switch --flake ".#ken" + nix run "nixpkgs#home-manager" -- switch --flake ".#$1" fi |
