Repository navigation
nixos/systemd-nspawn: Refactor options and output - #512577
Conversation
Lyndeno
left a comment
There was a problem hiding this comment.
Untested on my end, but looks sound
|
I built |
Ma27
left a comment
There was a problem hiding this comment.
Without having tested it (hence no approval), looks sensible to me 👍
f2c511c to
6b08208
Compare
|
Thanks @Ma27 . Still need approval from a merger/maintainer though. Just rebased. |
There was a problem hiding this comment.
Thanks for contributing to the documentation.
Follow the documentation style guide, especially:
- Show, don’t tell. Start with a minimal working example. Explain after the code.
- Avoid meta-commentary. Don’t write "This section explains how to…".
- Use present tense, imperative mood, and active voice. For example: "Run the command," not "The user should run the following command."
- Avoid vague references like "this" when the referent is unclear. Write "This command creates a folder," not "This will create a folder."
- Be direct. Avoid "should", "might", "typically", and "usually".
- Cut filler words like "simply", "just", "easily", and "basically". Use "to" instead of "in order to".
For larger changes, such as adding or removing whole sections, ask the NixOS documentation team for review.
|
I guess this PR introduces a breaking change, so as per the release schedule (#567567), this will probably not make it into 26.11 anymore. I really hope we can get this merged soon! |
|
Well, I guess 3 weeks on top of 3.75 years is not going to hurt. |
Wait, no it doesn't. This change is backwards compatible thanks to the option renames. Existing nspawn configs would continue to function but would just raise a warning. |
|
Ran |
Two major changes in this commit: - Refactor options to use `.settings` pattern and use settingsToSections to generate the content. This brings the module in line with other modern systemd modules. - Write individual units to etc/: This allows imperative container management to create unit files in /etc/systemd/nspawn
6b08208 to
bb07471
Compare
|
I tried tracing back when the value was written as "1" and not "true" but it goes way further back than when I added that test, so I don't know how that happened. Anyway, fixed now. Thanks for catching it. |
|
Ok the VM test passes now. I'll test it with some nspawn stuff I have laying around as well. |
|
Ok, my test container works. |
All changes addressed and re-reviewed by others.
|
I'm doing one more test and will hit the button whenever it finishes |
|
I cannot get any container tests to run to see if this effects them. But I do not think this change does? Can you confirm this? |
|
Ok they are uneffected. |
You mean NixOS containers? I have a backwards compatibility test suite in my other repo. I'll give that another quick run but it has been tested previously and this specific change doesn't otherwise effect them. |
|
No, I was just making sure that the nixosTests that use nspawn containers rather than qemu vms were uneffected by this change |
|
Thanks for merging! 🥳 |
|
Caused minor eval failure. Proposed possible fix as: |
|
Thanks for finding and fixing that. |
Part of breaking up #216025
This PR comprises of three main changes:
systemd.nspawn.unitproperty which mimicssystemd.unit.textbut is the actual unit file instead, which in imperative container generation avoids needing to evaluate the entirety of environment.etc to get a single nspawn unit.Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.