✨ (vscode) add upgrade script task
This commit is contained in:
parent
e7055370cb
commit
a948122886
11
.vscode/tasks.json
vendored
Normal file
11
.vscode/tasks.json
vendored
Normal 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
14
.vscode/upgrade.sh
vendored
Executable 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
|
Loading…
Reference in a new issue