diff options
author | Zhongheng Liu <z.liu@outlook.com.gr> | 2025-01-08 14:14:12 +0200 |
---|---|---|
committer | Zhongheng Liu <z.liu@outlook.com.gr> | 2025-01-08 14:14:12 +0200 |
commit | 35b2d418540f398875ea338db1e29dbc1c381a69 (patch) | |
tree | 68c040bfc684a4edf6c3cdc2f552fe6f42d0ab8e /deploy.sh | |
parent | 8953c93b60e31357a60112f8f707a1bb6cff0572 (diff) | |
parent | ecaf5df80adb914875ff926410e9226d72f8fa05 (diff) | |
download | nixos-configuration-feature-email-msmtp.tar.gz nixos-configuration-feature-email-msmtp.tar.bz2 nixos-configuration-feature-email-msmtp.zip |
Merge branch 'main' into feature-email-msmtpfeature-email-msmtp
Diffstat (limited to 'deploy.sh')
-rw-r--r-- | deploy.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..cc2aaf5 --- /dev/null +++ b/deploy.sh @@ -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=$2 +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 + |