Repository navigation
Conversation
This adds a `vmlinux` output to the `linuxManualConfig` derivation, making it easier to access the kernel ELF file without creating a modular kernel, which previously has been the requirement for the `dev` output, in which the `vmlinux` file lived.
This adds the necessary BTF information for systemd's BPF programs. This relies on a purpose-built, minimal kernel, from which the `vmlinux.h` header file with the kernel-internal definitions is generated. Note that the systemd derivation is not depending on that specific kernel, it's just used for initial compilation. At runtime, the symbols are relocated using BPF CO-RE.
This adds enable knobs for nsresourced and mountfsd. These toggles are passed-through, so that they can be consumed by the NixOS module.
This conditionally enables the nsresourced and mountfsd services, which are used to enable rootless systemd-nspawn containers.
nix-owners
Bot
requested review from
Ma27,
NeQuissimus,
TredwellGit,
kloenk and
thoughtpolice
May 6, 2025 19:09
Contributor
Author
|
Didn't anticipate that many rebuilds, will retarget against staging later. |
dramforever
reviewed
May 6, 2025
dramforever
reviewed
May 6, 2025
Contributor
Author
|
Closing this while I'm retargeting to staging. |
3 of 13 tasks
5 tasks done
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.
This adds support for rootless systemd-nspawn containers on NixOS by doing a few things:
linuxManualConfigbuilder by unconditionally emitting avmlinuxoutput, not just whenCONFIG_MODULES=y(also removing an IFD requirement for that).nsresourcedandmountfsd. This is achieved by building a minimal custom kernel, generating avmlinux.hfile from that, and consuming that in systemd. This does not create a strong dependency between the systemd package and a specific kernel version, asthe header file is only used for initial compilation, and BPF symbols are being relocated at runtime later on using BPF CO-RE.
systemd-{nsresourced,mountfsd}binaries in the systemd package. These are passed-through, to be consumed by the NixOS module.Change can be quickly verified by the following pre-change and post-change:
sudo $(nix build .#systemd.out --print-out-paths --no-link)/lib/systemd/systemd-nsresourcedPrior to the change, this will show:
After the change:
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.