nixos-config/nixos/profiles/system/disko/btrfs-common.nix

58 lines
1.3 KiB
Nix

{ ... }:
{
disko.devices = {
nodev = {
"/" = {
fsType = "tmpfs";
mountOptions = [
"defaults"
"mode=755"
"nosuid"
"nodev"
];
};
};
disk = {
main = {
type = "disk";
content = {
type = "gpt";
partitions = {
esp = {
label = "ESP";
size = "2G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
label = "ROOT";
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"/nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" ];
};
"/persist" = {
mountpoint = "/persist";
mountOptions = [ "compress=zstd" ];
};
};
};
};
};
};
};
};
};
fileSystems."/persist".neededForBoot = true;
}