Initial commit

This commit is contained in:
2025-08-20 18:24:02 +03:00
commit 2dec42d487
116 changed files with 6591 additions and 0 deletions

24
lib/fs.nix Normal file
View File

@@ -0,0 +1,24 @@
final: prev:
let
filesystem = fsType: path: device: options: {
fileSystems.${path} =
{ inherit device fsType; }
// final.optionalAttrs (options != null) { inherit options; };
};
in {
btrfs = filesystem "btrfs";
ntfs = filesystem "ntfs-3g";
ext4 = filesystem "ext4";
vfat = filesystem "vfat";
zfs = filesystem "zfs";
tmpfs = filesystem "tmpfs";
swap = device: {swapDevices = [{inherit device;}];};
luks = mapper: device: additional: {
boot.initrd.luks.devices.${mapper} = {
inherit device;
} // additional;
};
}