fix: NixOS | fix disko lvm_luks setup

This commit is contained in:
Shahab Dogar
2025-02-07 00:05:50 +05:00
parent 781cd2811c
commit 3a32da519b

View File

@@ -1,8 +1,9 @@
{device ? throw "Set this to your disk device, e.g. /dev/sda", ...}: { {
disko.devices = { disko = {
devices = {
disk = { disk = {
main = { main = {
inherit device; device = "/dev/nvme0n1";
type = "disk"; type = "disk";
content = { content = {
type = "gpt"; type = "gpt";
@@ -27,9 +28,9 @@
content = { content = {
name = "crypted"; name = "crypted";
type = "luks"; type = "luks";
passwordFile = "/tmp/secret.key";
settings = { settings = {
allowDiscards = true; allowDiscards = true;
keyFile = "/tmp/secret.key";
crypttabExtraOpts = [ crypttabExtraOpts = [
"fido2-device=auto" "fido2-device=auto"
"token-timeout=10" "token-timeout=10"
@@ -45,7 +46,6 @@
}; };
}; };
}; };
};
lvm_vg = { lvm_vg = {
luks_vg = { luks_vg = {
type = "lvm_vg"; type = "lvm_vg";
@@ -58,7 +58,7 @@
}; };
}; };
root = { root = {
size = "100%FREE"; size = "100%";
content = { content = {
type = "btrfs"; type = "btrfs";
extraArgs = ["-L" "nixos" "-f"]; extraArgs = ["-L" "nixos" "-f"];
@@ -88,4 +88,6 @@
}; };
}; };
}; };
};
};
} }