From 5ee1c7eddb1fffd94003cf49750180c1e9f96e8d Mon Sep 17 00:00:00 2001 From: ranomier Date: Wed, 8 Jan 2025 16:14:42 +0100 Subject: [PATCH] more expressive --- nswitch | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nswitch b/nswitch index e90d6a5..bf6e36b 100755 --- a/nswitch +++ b/nswitch @@ -41,12 +41,15 @@ if ! [[ "${YESNO,,}" == "y" ]]; then exit_with_new_shell fi +printf ">>> Add everything to git staging so nix can find it\n" git add "$GIT_PATTERN" printf ">>> Rebuilding NixOS\n" sudo nixos-rebuild switch | tee nixos-switch.log || ( grep --color error nixos-switch.log && false) gen=$(nixos-rebuild list-generations | grep current) + +printf ">>> commiting to git\n" git commit -am "$gen" exit_with_new_shell