diff options
| author | tv <tv@krebsco.de> | 2026-12-01 14:33:19 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-12-01 14:33:19 +0000 |
| commit | f8baace71fcf773125d1cdb1f92865aaf60b73f9 (patch) | |
| tree | aa9e9e55370dd5bf9e00cf3f6552e2aef48c169f | |
| parent | 7d7c3ead7ffc6e2796e17ef9a94c771738c5c3a7 (diff) | |
krops.nix: refuse the enstate action while the profile waits for a reboot
The running generation would plan the submissions, and refuse what only
the profile's generation has a slot for; the reboot would find nothing
to take.
| -rw-r--r-- | krops.nix | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -255,6 +255,13 @@ rec { ${enstateSteps.packAndCopy} ${pkgs.krops.runShell (lib.mkTarget target) {} /* sh */ '' set -efu + # The running generation isn't the profile's (after a deploy with boot, + # or test): it would plan what's meant for the one the next boot runs, + # and refuse what only that one has a slot for. + if [ "$(readlink -f /nix/var/nix/profiles/system)" != "$(readlink -f /run/current-system)" ]; then + echo "${name}: the running generation isn't the system profile's: reboot, or deploy" >&2 + exit 1 + fi ${enstateSteps.movePending} /run/current-system/sw/bin/enstate --migrate ${enstateSteps.showStatus "/run/current-system"} |
