aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/fu/fupdate-sys/fupdate-sys.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/fu/fupdate-sys/fupdate-sys.sh')
-rwxr-xr-xpkgs/by-name/fu/fupdate-sys/fupdate-sys.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/by-name/fu/fupdate-sys/fupdate-sys.sh b/pkgs/by-name/fu/fupdate-sys/fupdate-sys.sh
index 57ced766..9cead603 100755
--- a/pkgs/by-name/fu/fupdate-sys/fupdate-sys.sh
+++ b/pkgs/by-name/fu/fupdate-sys/fupdate-sys.sh
@@ -163,6 +163,10 @@ msg2 "Updating system..."
nixos-rebuild "${MODE-switch}"
git switch "$(cat "$default_branch")" >/dev/null 2>&1 && msg2 "Switched to branch '$(cat "$default_branch")'"
+
+msg "Setting oneshot boot entry to new generation.."
+bootctl set-oneshot "$(bootctl list --json=short | jq 'map(if .sortKey == "lanza" then .id else empty end) | first' --raw-output)"
+
msg "Finished Update!"
# vim: ft=sh