use erofs w/zstd compression. clean up a bit.

This commit is contained in:
Daniel Lundin 2024-10-05 17:19:30 +02:00
parent 3d7778f5cf
commit 5413d6ab6b
Signed by: dln
SSH key fingerprint: SHA256:dQy1Xj3UiqJYpKR5ggQ2bxgz4jCH8IF+k3AB8o0kmdI
6 changed files with 240 additions and 42 deletions

13
modules/kernel.nix Normal file
View file

@ -0,0 +1,13 @@
{ pkgs, ... }:
{
boot.kernelPackages = pkgs.linuxPackages_6_11;
boot.kernelPatches = [
{
# name = "crashdump-config";
patch = null;
extraConfig = ''
EROFS_FS_ZIP_ZSTD y
'';
}
];
}

View file

@ -19,6 +19,14 @@
name = config.boot.uki.name;
split = true;
mkfsOptions = {
erofs = [
"-zzstd,5" # Zstd compression
"-T0" # Fixed timestamp for all files
"-Efragments,dedupe,ztailpacking" # Extended options
];
};
partitions = {
"esp" = {
contents = {
@ -48,8 +56,8 @@
repartConfig = {
Type = "linux-generic";
Label = "${config.boot.uki.name}_${config.system.image.version}";
Format = "squashfs";
Minimize = "off";
Format = "erofs";
Minimize = "best";
ReadOnly = "yes";
SizeMinBytes = "1G";