Bcachefs: Difference between revisions
imported>Onny mNo edit summary |
imported>Onny Update installation media generation to nix flakes |
||
Line 54: | Line 54: | ||
=== Generate bcachefs enabled installation media === | === Generate bcachefs enabled installation media === | ||
Use following Nix expression | Use following Nix [[Flakes|Flake-expression]] to generate a ISO installation image with a bcachefs enabled kernel | ||
< | {{file|flake.nix|nix|<nowiki> | ||
{ | { | ||
description = "Bcachefs enabled installation media"; | |||
inputs.nixos.url = "nixpkgs/23.11-beta"; | |||
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.supportedFilesystems = [ "bcachefs" ]; | |||
boot.kernelPackages = lib.mkOverride 0 pkgs.linuxPackages_testing_bcachefs; | |||
}) | |||
]; | |||
}; | |||
}; | |||
}; | |||
} | } | ||
</ | </nowiki>}} | ||
The following commands will generate the iso-image which will be available in the directory <code>./result/iso</code> | |||
<syntaxhighlight lang="console"> | <syntaxhighlight lang="console"> | ||
# nix | # git init | ||
# git add flake.nix | |||
# nix build .#nixosConfigurations.exampleIso.config.system.build.isoImage | |||
</syntaxhighlight> | </syntaxhighlight> | ||