Draft
Conversation
a186653 to
42e7674
Compare
42e7674 to
9f80b24
Compare
e59057e to
6188280
Compare
6e5bcda to
6b0541f
Compare
7f996e0 to
c97de8f
Compare
c97de8f to
43a2e20
Compare
Before, time spans were stored as a string, and parsed whenever a direct time.Duration was needed. This is strange and requires manual conversions, as compared to just using a new type for this and implementing serialization/deserialization for the type directly so that it can be used by both cobra and koanf as flag/config types. This will also enable usage of systemd.time(7) spans in koanf configs, with stronger validation as well.
shlex.Quote() is much more strict in escaping than my much more lax utils.Quote() string. Using manual quoting allows passing multi-line strings such as the supervisor script properly.
43a2e20 to
6ec21fc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In case changes in configuration settings for connections (i.e. SSH, internet interfaces, etc.) restart and cause loss of access to the machine in question, this PR implements a magic rollback mechanism that runs on the target.
It offloads a ton of the switch logic into a
supervisorbash script, which gets ran as asystemd-runtransient unit on the host. What makes this hugely different fromdeploy-rsis that it does not require modifying the destination closure whatsoever, so magic rollback can be used on systems withoutnixos-cliWHATSOEVER, including on a completely base NixOS system with no extra options.Closes #119.