-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
nixos/profiles/base: support bcachefs #361461
base: master
Are you sure you want to change the base?
Conversation
685e9b1
to
a1b7cae
Compare
Test condition was updated to check the actual underlying kernel package:
However, evaluating with the current bcachefs ISO sample code sans the explicit bcachefs enablement is still causing error:
|
If you build an image with bcache support based on the installer profile, you can disable zfs like this:
Or enable zfsUnstable (which supports a kernel also supported by bcachefs. |
Here is the full code that I'm testing with that got the above infinite recursion, which is already using
Either way I don't think this is related to ZFS, but I'm also not sure how to fix this infinite recursion issue. |
Ah. Actually I noticed you removed the force override |
a1b7cae
to
4379ad8
Compare
Um this PR currently does not build the sample I provided. My guess is that I'm referencing |
Maybe just enable it in the installer profile that adds the latest kernel? |
4379ad8
to
28c10e4
Compare
boot.postBootCommands = '' | ||
${lib.getExe pkgs.keyutils "keyctl"} link @u @s | ||
''; |
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.
But this should be part of the bcachefs module no?
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.
In keyctl's man page it says:
Session keyring: @s or -3
Each process subscribes to a session keyring that is
inherited across (v)fork, exec and clone. This is searched
after the process keyring. Session keyrings can be named
and an extant keyring can be joined in place of a
process's current session keyring.
User specific keyring: @u or -4
This keyring is shared between all the processes owned by
a particular user. It isn't searched directly, but is
**normally linked to from the session keyring.**
So it looks like this might be a more general configuration that are not limited to bcachefs usage. But I'm not sure why we didn't link those 2 keyrings in the first place, and if that actually should be a general setting. So I'm just doing the safe thing as listed in the NixOS Wiki.
@@ -6,6 +6,8 @@ | |||
|
|||
- The default PHP version has been updated to 8.3. | |||
|
|||
- `bcachefs` is now enabled in the installation media with a suitable kernel. |
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.
- `bcachefs` is now enabled in the installation media with a suitable kernel. | |
- `bcachefs` is now enabled in the installation media with the latest kernel available. |
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 think we can see 25.05 releases with 6.12 as the default, and hopefully bcachefs module can drop its version override. In that case we just go back to the version check (>=6.7) so a suitable kernel
will be more appropriate.
But then it turned out currently it is quite difficult to check if the config.boot.kernelPackages
is actually pkgs.linuxPackages_latest
, so this PR is no longer the one-liner I was expecting. Might be better to actually wait for those blockages to be fixed first before continuing.
6.12 is the default now: #370410 |
Yeah that means we could just enable it without any hacks. |
28c10e4
to
52de04c
Compare
linuxPackages is bumped to 6.12 in NixOS#370410
a192bd0
to
3de2b11
Compare
3de2b11
to
e141068
Compare
Locally built the ISO for 6.6 and default, and confirmed nix-store.squashfs contains bcachefs stuff if # nix build --show-trace .#nixosConfigurations.exampleIso.config.system.build.isoImage
{
description = "Bcachefs enabled installation media";
inputs.nixos.url = "github:MakiseKurisu/nixpkgs/bcachefs-base";
outputs = { self, nixos }: {
nixosConfigurations = {
exampleIso = nixos.lib.nixosSystem {
system = "x86_64-linux";
modules = [
"${nixos}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
({ lib, pkgs, ... }: {
boot.kernelPackages = pkgs.linuxPackages_6_6;
})
];
};
};
};
} |
Add bcachefs support in the base profile.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-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.