feat(loki): fix disk-config.nix

This commit is contained in:
CronyAkatsuki 2025-05-18 21:32:45 +02:00
parent 5512e421ca
commit 1158d9005f

View file

@ -1,58 +1,51 @@
{ {lib, ...}: {
disko.devices = { disko.devices = {
disk = { disk.disk1 = {
main = { device = lib.mkDefault "/dev/vda";
type = "disk"; type = "disk";
device = "/dev/nvme0n1";
content = { content = {
type = "gpt"; type = "gpt";
partitions = { partitions = {
ESP = { boot = {
size = "512M"; name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP";
size = "500M";
type = "EF00"; type = "EF00";
content = { content = {
type = "filesystem"; type = "filesystem";
format = "vfat"; format = "vfat";
mountpoint = "/boot"; mountpoint = "/boot";
mountOptions = ["umask=0077"];
}; };
}; };
luks = { root = {
name = "root";
size = "100%"; size = "100%";
content = { content = {
type = "luks"; type = "lvm_pv";
name = "crypted"; vg = "pool";
settings.allowDiscards = true; };
passwordFile = "/tmp/secret.key"; };
};
};
};
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
root = {
size = "100%FREE";
content = { content = {
type = "btrfs"; type = "filesystem";
extraArgs = ["-f"]; format = "ext4";
subvolumes = {
"@" = {
mountpoint = "/"; mountpoint = "/";
mountOptions = [ mountOptions = [
"compress=zstd" "defaults"
"noatime"
]; ];
}; };
"@home" = {
mountpoint = "/home";
mountOptions = [
"compress=zstd"
"noatime"
];
};
"@nix" = {
mountpoint = "/nix";
mountOptions = [
"compress=zstd"
"noatime"
];
};
};
};
};
};
}; };
}; };
}; };