(vscode) add upgrade script task

This commit is contained in:
Laureηt 2023-09-03 13:12:45 +02:00
parent e7055370cb
commit a948122886
Signed by: Laurent
SSH key fingerprint: SHA256:kZEpW8cMJ54PDeCvOhzreNr4FSh6R13CMGH/POoO8DI
2 changed files with 25 additions and 0 deletions

11
.vscode/tasks.json vendored Normal file
View file

@ -0,0 +1,11 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "flake upgrade",
"type": "shell",
"command": "tmux new -s flake-update .vscode/upgrade.sh",
"problemMatcher": []
}
]
}

14
.vscode/upgrade.sh vendored Executable file
View file

@ -0,0 +1,14 @@
# stop on error
set -euxo pipefail
# update lock file
nix flake update
# update systems
sudo nixos-rebuild switch -L --flake .#neodymium
nixos-rebuild switch -L --flake .#hydrogen --target-host hydrogen
# commit and push lock file
git add flake.lock
git commit -m "⬆️ nix flake update"
git push