Merge pull request #740 from MatthewCroughan/mc/f2fs

f2fs: init
This commit is contained in:
lassulus 2024-08-20 11:57:11 +02:00 committed by GitHub
commit 93d5cff63d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 51 additions and 0 deletions

34
example/f2fs.nix Normal file
View file

@ -0,0 +1,34 @@
{
disko.devices = {
disk = {
main = {
device = "/dev/disk/by-path/pci-0000:02:00.0-nvme-1";
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
end = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
name = "root";
end = "-0";
content = {
type = "filesystem";
format = "f2fs";
mountpoint = "/";
};
};
};
};
};
};
};
}

View file

@ -90,6 +90,7 @@
else if (config.format == "ext3") then [ pkgs.e2fsprogs ]
else if (config.format == "ext4") then [ pkgs.e2fsprogs ]
else if (config.format == "bcachefs") then [ pkgs.bcachefs-tools ]
else if (config.format == "f2fs") then [ pkgs.f2fs-tools ]
else [ ]
);
description = "Packages";

16
tests/f2fs.nix Normal file
View file

@ -0,0 +1,16 @@
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "f2fs";
disko-config = ../example/f2fs.nix;
extraTestScript = ''
machine.succeed("mountpoint /");
machine.succeed("lsblk --fs >&2");
'';
# so that the installer boots with a f2fs enabled kernel
extraInstallerConfig = {
boot.supportedFilesystems = [ "f2fs" ];
};
}