mirror of
https://github.com/RGBCube/ncc
synced 2025-08-01 12:37:46 +00:00
Update rebuild script and fix grafana
This commit is contained in:
parent
afa708fa8d
commit
621812d645
2 changed files with 17 additions and 3 deletions
16
rebuild.nu
16
rebuild.nu
|
@ -14,5 +14,19 @@ def main --wrapped [
|
|||
"--log-format internal-json"
|
||||
] | append $arguments
|
||||
|
||||
sudo sh -c $"nixos-rebuild switch ($flags | str join ' ') |& nom --json"
|
||||
if host == (hostname) {
|
||||
sudo sh -c $"nixos-rebuild switch ($flags | str join ' ') |& nom --json"
|
||||
} else {
|
||||
git ls-files | tar -cf - --files-from - | zstd -c3 | save --force /tmp/config.tar.zst
|
||||
scp -q /tmp/config.tar.zst ($host + ':/tmp/')
|
||||
|
||||
ssh -q $host $"
|
||||
rm -rf /tmp/config
|
||||
mkdir /tmp/config
|
||||
cd /tmp/config
|
||||
tar -xf /tmp/config.tar.zst
|
||||
|
||||
sh -c 'sudo nixos-rebuild switch ($flags | str join ' ') |& nom --json'
|
||||
"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue