Remove the old disk layout for EDI

This commit is contained in:
Lillian Violet 2024-02-21 10:23:51 +01:00
parent 33d4b51c00
commit 4f22ad7e51
3 changed files with 32 additions and 85 deletions

View file

@ -19,29 +19,22 @@
]; ];
}; };
}; };
encryptedSwap = {
size = "4G";
content = {
type = "swap";
randomEncryption = true;
};
};
luks = { luks = {
size = "100%"; size = "100%";
content = { content = {
type = "luks"; type = "luks";
name = "crypted"; name = "crypted";
# disable settings.keyFile if you want to use interactive password entry extraOpenArgs = [];
#passwordFile = "/tmp/secret.key"; # Interactive
settings = { settings = {
allowDiscards = true; # if you want to use the key for interactive login be sure there is no trailing newline
# for example use `echo -n "password" > /tmp/secret.key`
#keyFile = "/tmp/secret.key"; #keyFile = "/tmp/secret.key";
allowDiscards = true;
}; };
#additionalKeyFiles = ["/tmp/additionalSecret.key"]; #additionalKeyFiles = ["/tmp/additionalSecret.key"];
content = { content = {
type = "filesystem"; type = "lvm_pv";
format = "bcachefs"; vg = "pool";
mountpoint = "/";
}; };
}; };
}; };
@ -49,5 +42,30 @@
}; };
}; };
}; };
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
swap = {
size = "8G";
content = {
type = "swap";
resumeDevice = true; # resume from hiberation from this device
};
};
root = {
size = "100%FREE";
content = {
type = "filesystem";
format = "bcachefs";
mountpoint = "/";
mountOptions = [
"defaults"
];
};
};
};
};
};
}; };
} }

View file

@ -1,71 +0,0 @@
{
disko.devices = {
disk = {
nvme0n1 = {
type = "disk";
device = "/dev/disk/by-path/pci-0000:71:00.0-nvme-1";
content = {
type = "gpt";
partitions = {
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"defaults"
];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
extraOpenArgs = [];
settings = {
# if you want to use the key for interactive login be sure there is no trailing newline
# for example use `echo -n "password" > /tmp/secret.key`
#keyFile = "/tmp/secret.key";
allowDiscards = true;
};
#additionalKeyFiles = ["/tmp/additionalSecret.key"];
content = {
type = "lvm_pv";
vg = "pool";
};
};
};
};
};
};
};
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
swap = {
size = "8G";
content = {
type = "swap";
resumeDevice = true; # resume from hiberation from this device
};
};
root = {
size = "100%FREE";
content = {
type = "filesystem";
format = "bcachefs";
mountpoint = "/";
mountOptions = [
"defaults"
];
};
};
};
};
};
};
}

View file

@ -24,7 +24,7 @@
../../desktop ../../desktop
../../../disko/EDI/lvm.nix ../../../disko/EDI
# Import your generated (nixos-generate-config) hardware configuration # Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix ./hardware-configuration.nix