feat: UNTESTED: quick and dirty deploy script
This commit is contained in:
parent
71b70ecb3a
commit
4c07b4d0a4
1 changed files with 18 additions and 0 deletions
18
deploy.sh
Normal file
18
deploy.sh
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
# Deploys the configuation to your machine
|
||||||
|
|
||||||
|
TMP_DIRNAME="/tmp/nix-config"
|
||||||
|
GIT_REMOTE_SRC=$1
|
||||||
|
NIX_HOST="<YOUR_HOSTNAME_HERE>"
|
||||||
|
echo "Going to clone $GIT_REMOTE_SRC into $TMP_DIRNAME"
|
||||||
|
mkdir "$TMP_DIRNAME"
|
||||||
|
|
||||||
|
git clone "$GIT_REMOTE_SRC" "$TMP_DIRNAME"
|
||||||
|
prev=$PWD
|
||||||
|
cd "$TMP_DIRNAME" || return
|
||||||
|
echo "Now going to build nix configuration for $NIX_HOST to switch on next boot"
|
||||||
|
sudo nixos-rebuild --flake .#$NIX_HOST boot
|
||||||
|
|
||||||
|
cd "$prev" || return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue