use hostId for luks disks

Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
2025-06-21 16:28:16 +03:00
parent d135a13a5a
commit 7d0e089e3f
10 changed files with 62 additions and 21 deletions

View File

@ -1,4 +1,9 @@
{inputs, ...}: let
{
config,
inputs,
...
}: let
inherit (config.networking) hostId;
disk = "/dev/nvme0n1";
in {
imports = with inputs; [
@ -10,5 +15,5 @@ in {
mountOptions = ["rw" "nosuid" "nodev"];
};
};
disko.devices.disk.main = import ./disk-main.nix {inherit disk;};
disko.devices.disk.main = import ./disk-main.nix {inherit disk hostId;};
}

View File

@ -1,4 +1,8 @@
{disk, ...}: {
{
disk,
hostId,
...
}: {
type = "disk";
device = disk;
content = {
@ -25,7 +29,7 @@
size = "100%";
content = {
type = "luks";
name = "luks-main";
name = "luks-" + hostId;
initrdUnlock = true;
settings.allowDiscards = true;
content = {