mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
refactor: make luks names predictable
This commit is contained in:
parent
490e2ce1a5
commit
664cb45a08
14 changed files with 68 additions and 61 deletions
|
@ -2,23 +2,25 @@
|
|||
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 = [
|
||||
(partLuksZfs "rpool" "0%" "100%")
|
||||
(partLuksZfs disks.m2-ssd "rpool" "0%" "100%")
|
||||
];
|
||||
};
|
||||
};
|
||||
boot-ssd = {
|
||||
${disks.boot-ssd} = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/${config.repo.secrets.local.disk.boot-ssd}";
|
||||
device = "/dev/disk/by-id/${disks.boot-ssd}";
|
||||
content = with lib.disko.gpt; {
|
||||
type = "table";
|
||||
format = "gpt";
|
||||
|
@ -33,6 +35,4 @@
|
|||
rpool = mkZpool {datasets = impermanenceZfsDatasets;};
|
||||
};
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices.enc-rpool.allowDiscards = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue