refactor: make luks names predictable

This commit is contained in:
oddlama 2024-01-05 13:29:46 +01:00
parent 490e2ce1a5
commit 664cb45a08
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
14 changed files with 68 additions and 61 deletions

View file

@ -2,19 +2,21 @@
config,
lib,
...
}: {
}: let
inherit (config.repo.secrets.local) disks;
in {
disko.devices = {
disk = {
m2-ssd = {
${disks.m2-ssd} = {
type = "disk";
device = "/dev/disk/by-id/${config.repo.secrets.local.disk.m2-ssd}";
device = "/dev/disk/by-id/${disks.m2-ssd}";
content = with lib.disko.gpt; {
type = "table";
format = "gpt";
partitions = [
(partEfi "efi" "0%" "1GiB")
(partSwap "swap" "1GiB" "17GiB")
(partLuksZfs "rpool" "17GiB" "100%")
(partLuksZfs disks.m2-ssd "rpool" "17GiB" "100%")
];
};
};
@ -34,6 +36,4 @@
rpool = mkZpool {datasets = impermanenceZfsDatasets;};
};
};
boot.initrd.luks.devices.enc-rpool.allowDiscards = true;
}

Binary file not shown.