NixOS on RISCV/VisionFive 2: Difference between revisions
→Setup: Update links to precompiled images |
→Setup: Add note on required patch for btrfs root image |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 86: | Line 86: | ||
}); | }); | ||
} | } | ||
</nowiki>}} | |||
If you want to use an alternative filesystem for system root, for example [[Btrfs]], you could change the <code>sdImage</code>-part to this. Currently [https://github.com/NixOS/nixpkgs/pull/434122 this patch] is required to produce a functioning btrfs image. | |||
{{file|flake.nix|nix|<nowiki> | |||
sdImage = { | |||
compressImage = false; | |||
rootFilesystemCreator = "${pkgs.path}/nixos/lib/make-btrfs-fs.nix"; | |||
# do this manually as replacing the resize2fs string in postBootCommands | |||
# might be too complex. btrfs uses its own resize command. | |||
expandOnBoot = false; | |||
}; | |||
nixpkgs.overlays = [ | |||
(final: prev: { | |||
ubootVisionFive2 = prev.ubootVisionFive2.overrideAttrs (oldAttrs: { | |||
extraConfig = (oldAttrs.extraConfig or "") + '' | |||
CONFIG_FS_BTRFS=y | |||
CONFIG_CMD_BTRFS=y | |||
''; | |||
}); | |||
}) | |||
]; | |||
fileSystems."/" = { | |||
fsType = lib.mkForce "btrfs"; | |||
options = [ | |||
"compress=zstd" | |||
"noatime" | |||
]; | |||
}; | |||
</nowiki>}} | </nowiki>}} | ||