Better utility
This commit is contained in:
1 parent
c1fa9867b5
commit
c0831c51b3
2 files changed
+40
-1
No files matched your search
File renamed without changes.
@@ -58,6 +58,18 @@ function run-switch() {
|
||||
|
||||
}
|
||||
|
||||
function run-rollback() {
|
||||
: Rolls back to last configuration
|
||||
:
|
||||
sudo nixos-rebuild switch --rollback
|
||||
}
|
||||
|
||||
function run-update() {
|
||||
: Updates a single flake
|
||||
: Usage: skyg update {name-of-input}
|
||||
nix flake lock --update-input ${1}
|
||||
}
|
||||
|
||||
function run-diff() {
|
||||
: Diff results to current system
|
||||
:
|
||||
@@ -76,7 +88,34 @@ function run-remote-deploy() {
|
||||
: Usage: skyg remote-deploy {target} {cmd}
|
||||
target=${1}
|
||||
cmd=${2}
|
||||
$ROOT_FOLDER/bin/build-remote-nixos ${target} ${cmd}
|
||||
$ROOT_FOLDER/bin/extra/build-remote-nixos ${target} ${cmd}
|
||||
}
|
||||
|
||||
|
||||
function run-build-all() {
|
||||
: Builds all remote and local configurations
|
||||
: Usage: skyg build-all
|
||||
mkdir -p results
|
||||
|
||||
nix flake show --json | jq -r -c '.nixosConfigurations | keys[]' | while read i; do
|
||||
echo "[[SKYG]] Building current $i"
|
||||
sudo nixos-rebuild build --flake .#$i
|
||||
rm -f results/$i-result
|
||||
mv result results/$i-result
|
||||
done
|
||||
|
||||
nix flake update
|
||||
|
||||
rm -f diffs
|
||||
mkdir diffs
|
||||
nix flake show --json | jq -r -c '.nixosConfigurations | keys[]' | while read i; do
|
||||
echo "[[SKYG]] Building new $i"
|
||||
sudo nixos-rebuild build --flake .#$i
|
||||
rm -f results/$i-result-post
|
||||
mv result results/$i-result-post
|
||||
nvd diff results/$i-result results/$i-result-post > diffs/$i
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user