forked from mirrors_public/oddlama_nix-config
refactor: make luks names predictable
This commit is contained in:
parent
490e2ce1a5
commit
664cb45a08
14 changed files with 68 additions and 61 deletions
|
@ -2,19 +2,21 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
inherit (config.repo.secrets.local) disks;
|
||||
in {
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
${disks.main} = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/${config.repo.secrets.local.disk.main}";
|
||||
device = "/dev/disk/by-id/${disks.main}";
|
||||
content = with lib.disko.gpt; {
|
||||
type = "table";
|
||||
format = "gpt";
|
||||
partitions = [
|
||||
(partGrub "grub" "0%" "1MiB")
|
||||
(partEfi "bios" "1MiB" "512MiB")
|
||||
(partLuksZfs "rpool" "512MiB" "100%")
|
||||
(partLuksZfs disks.main "rpool" "512MiB" "100%")
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@ -24,6 +26,5 @@
|
|||
};
|
||||
};
|
||||
|
||||
boot.loader.grub.devices = ["/dev/disk/by-id/${config.repo.secrets.local.disk.main}"];
|
||||
boot.initrd.luks.devices.enc-rpool.allowDiscards = true;
|
||||
boot.loader.grub.devices = ["/dev/disk/by-id/${disks.main}"];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue