mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-10 23:00: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,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.
Loading…
Add table
Add a link
Reference in a new issue