Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2505.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

- `nixos-option` has been rewritten to a Nix expression called by a simple bash script. This lowers our maintenance threshold, makes eval errors less verbose, adds support for flake-based configurations, descending into `attrsOf` and `listOf` submodule options, and `--show-trace`.

- `bcachefs` is now enabled in the installation media when kernel is at least 6.7.

- The Mattermost module ({option}`services.mattermost`) and packages (`mattermost` and `mmctl`) have been substantially updated:
- `pkgs.mattermostLatest` is now an option to track the latest (non-prerelease) Mattermost release. We test upgrade migrations from ESR releases (`pkgs.mattermost`) to `pkgs.mattermostLatest`.
- The Mattermost frontend is now built from source and can be overridden.
Expand Down
7 changes: 7 additions & 0 deletions nixos/modules/profiles/base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,15 @@
# Include support for various filesystems and tools to create / manipulate them.
boot.supportedFilesystems =
[ "btrfs" "cifs" "f2fs" "ntfs" "vfat" "xfs" ] ++
lib.optional (config.boot.kernelPackages.kernel.kernelAtLeast "6.7") "bcachefs" ++
lib.optional (lib.meta.availableOn pkgs.stdenv.hostPlatform config.boot.zfs.package) "zfs";

# Might be required as a workaround for bcachefs bug
# https://github.com/NixOS/nixpkgs/issues/32279#issuecomment-1093682970
boot.postBootCommands = lib.optionalString (config.boot.supportedFilesystems.bcachefs or false) ''
${lib.getExe' pkgs.keyutils "keyctl"} link @u @s
'';

# Configure host id for ZFS to work
networking.hostId = lib.mkDefault "8425e349";
}
2 changes: 0 additions & 2 deletions nixos/modules/tasks/filesystems/bcachefs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ in
inherit assertions;
# needed for systemd-remount-fs
system.fsPackages = [ pkgs.bcachefs-tools ];
# FIXME: Remove this line when the LTS (default) kernel is at least version 6.7
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
services.udev.packages = [ pkgs.bcachefs-tools ];

systemd = {
Expand Down