mob next [ci-skip] [ci skip] [skip ci]

lastFile:machines/buna/disko.nix
This commit is contained in:
2026-08-18 16:47:06 +07:00
parent 82a974ad56
commit 0199e7a49d
+52 -16
View File
@@ -1,7 +1,7 @@
{ ... }: { ... }:
let let
hashDisk = disk: "os-${builtins.substring 0 5 (builtins.hashString "sha256" disk)}"; hashDisk = disk: "os-${builtins.substring 0 5 (builtins.hashString "sha256" disk)}";
os = "/dev/disk/by-id/usb-Generic_MassStorageClass_000000001539-0:0"; os = "/dev/disk/by-id/mmc-TLimmc_0xda6d8fbf";
in in
{ {
@@ -14,6 +14,8 @@ in
}; };
}; };
boot.zfs.forceImportRoot = true;
disko.devices = { disko.devices = {
disk = { disk = {
"os-${hashDisk os}" = { "os-${hashDisk os}" = {
@@ -23,31 +25,65 @@ in
type = "gpt"; type = "gpt";
partitions = { partitions = {
ESP = { ESP = {
end = "500M"; size = "1G";
type = "EF00"; type = "EF00";
content = { content = {
type = "filesystem"; type = "filesystem";
format = "vfat"; format = "vfat";
mountpoint = "/boot"; mountpoint = "/boot";
mountOptions = [ "umask=0077" ]; mountOptions = [ "nofail" ];
}; };
}; };
root = { system = {
name = "root"; size = "100%";
end = "-0";
content = { content = {
type = "filesystem"; type = "zfs";
format = "f2fs"; pool = "zroot";
mountpoint = "/";
extraArgs = [
"-O"
"extra_attr,inode_checksum,sb_checksum,compression"
];
mountOptions = [
"compress_algorithm=zstd:6,compress_chksum,atgc,gc_merge,lazytime,nodiscard"
];
}; };
}; };
swap = {
size = "4G";
content = {
type = "swap";
};
};
};
};
};
};
zpool = {
zroot = {
type = "zpool";
rootFsOptions = {
mountpoint = "none";
compression = "lz4";
acltype = "posixacl";
xattr = "sa";
"com.sun:auto-snapshot" = "true";
};
options.ashift = "12";
datasets = {
"root" = {
type = "zfs_fs";
options.mountpoint = "none";
};
"root/nixos" = {
type = "zfs_fs";
options.mountpoint = "/";
mountpoint = "/";
};
"root/home" = {
type = "zfs_fs";
options.mountpoint = "/home";
mountpoint = "/home";
};
"root/tmp" = {
type = "zfs_fs";
mountpoint = "/tmp";
options = {
mountpoint = "/tmp";
sync = "disabled";
};
}; };
}; };
}; };