-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vmupdate: add support for nixos #168
base: main
Are you sure you want to change the base?
Conversation
will resign this with gpg later |
@@ -276,7 +276,10 @@ def upgrade_internal(self, remove_obsolete: bool) -> ProcessResult: | |||
Just run upgrade via CLI. | |||
""" | |||
cmd = [self.package_manager, | |||
"--noconfirm" if self.package_manager == "pacman" else "-y", | |||
*( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i just extended the existing pattern but please let me know if you'd prefer I clean this up in some way. as-is package manager specifics are leaking into this common module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already fixed in #164, but it waits for resolving conflicts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI the other PR is merged now, you can rebase to resolve the conflict.
result.out += self._print_to_string( | ||
pkg, | ||
str(changes["updated"][pkg]["old"])[2:-2] | ||
", ".join((changes["updated"][pkg]["old"])) | ||
+ " -> " + | ||
str(changes["updated"][pkg]["new"])[2:-2]) | ||
", ".join((changes["updated"][pkg]["new"])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has a syntax error: not closed (
this PR adds support for nixos updates based on the discussion in QubesOS/qubes-issues#7992.
thanks for all the quick replies and advice @marmarek
notes:
nixos-rebuild
flags via the qubes update nix module. the possibility was mentioned that reading flags from a file might be preferred - however it seemed tidier this way and we can instead have the wrapper simply pass it's arguments on tonixos-rebuild
.nix store diff-closures
seemed to be the best option however it is designed to diff. e.g. compare the previous system closure to the previous ones. the wrapper script first constructs an empty closure so that we can diff against it. again, it seemed tidier to abstract these details away.