From a948122886d097018156a2b8b8a50ad5fef2e572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Sun, 3 Sep 2023 13:12:45 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20(vscode)=20add=20upgrade=20script?= =?UTF-8?q?=20task?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/tasks.json | 11 +++++++++++ .vscode/upgrade.sh | 14 ++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .vscode/tasks.json create mode 100755 .vscode/upgrade.sh diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..0729317 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,11 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "flake upgrade", + "type": "shell", + "command": "tmux new -s flake-update .vscode/upgrade.sh", + "problemMatcher": [] + } + ] +} \ No newline at end of file diff --git a/.vscode/upgrade.sh b/.vscode/upgrade.sh new file mode 100755 index 0000000..13125fc --- /dev/null +++ b/.vscode/upgrade.sh @@ -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