Reinstall north with luks encryption

This commit is contained in:
SebastianStork 2024-08-11 22:53:05 +02:00
parent fa4d802536
commit a84721bcf1
2 changed files with 49 additions and 14 deletions

View file

@ -1,25 +1,60 @@
{ {
disko.devices.disk.main = { disko.devices = {
device = "/dev/nvme0n1"; disk.main = {
type = "disk"; type = "disk";
content = { device = "/dev/nvme0n1";
type = "gpt"; content = {
partitions = { type = "gpt";
ESP = { partitions = {
type = "EF00"; ESP = {
size = "500M"; type = "EF00";
size = "512M";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "defaults" ];
};
};
luks = {
size = "100%";
content = {
name = "cryptroot";
type = "luks";
settings = {
allowDiscards = true;
bypassWorkqueues = true;
keyFile = "/dev/disk/by-id/usb-SCSI_DISK-0:0";
keyFileSize = 512;
keyFileTimeout = 5;
};
additionalKeyFiles = [ "/tmp/secret.key" ];
content = {
type = "lvm_pv";
vg = "pool";
};
};
};
};
};
};
lvm_vg.pool = {
type = "lvm_vg";
lvs = {
swap = {
size = "20G";
content = { content = {
type = "filesystem"; type = "swap";
format = "vfat"; resumeDevice = true;
mountpoint = "/boot";
}; };
}; };
root = { root = {
size = "100%"; size = "100%FREE";
content = { content = {
type = "filesystem"; type = "filesystem";
format = "ext4"; format = "ext4";
mountpoint = "/"; mountpoint = "/";
mountOptions = [ "defaults" ];
}; };
}; };
}; };

View file

@ -15,7 +15,7 @@
settings = { settings = {
devices = { devices = {
north.id = "ROS2S76-ULQWVFC-7KNQQ6Q-MNIWNKT-2QOPPHY-FFQZNVM-GUJRTHE-NZBM3QY"; north.id = "FAJS5WM-UAWGW2U-FXCGPSP-VAUOTGM-XUKSEES-D66PMCJ-WBODJLV-XTNCRA7";
inspiron.id = "DLFGFCF-MTYXA23-F235RKL-QFZ4GB6-BUHTYMX-DJCTFRA-NVMAE5Y-R63NMQY"; inspiron.id = "DLFGFCF-MTYXA23-F235RKL-QFZ4GB6-BUHTYMX-DJCTFRA-NVMAE5Y-R63NMQY";
}; };