Revert "[disko] Bit of a hack but the storage partition now gets mounted after zroot using a file on the disk."

This reverts commit 4a67683462.
This commit is contained in:
ahtlon
2025-03-04 17:53:34 +01:00
parent c409c5d53b
commit 7c300eb385
4 changed files with 6 additions and 6 deletions

View File

@@ -187,7 +187,6 @@ in
postCreateHook = lib.mkIf cfg.encryption ''
zfs set keylocation="prompt" zroot/encrypted;
'';
};
"encrypted/root" = {
type = "zfs_fs";
@@ -245,12 +244,13 @@ in
};
# use this to read the key during boot
postCreateHook = lib.mkIf cfg.encryption ''
zfs set keylocation="file:///root/secret.key" storage/encrypted;
zfs set keylocation="prompt" storage/encrypted;
'';
};
"encrypted/data" = {
type = "zfs_fs";
mountpoint = "/data";
options.mountpoint = "legacy";
};
"encrypted/data/microvms" = {
type = "zfs_fs";
@@ -271,7 +271,7 @@ in
};
boot.zfs.devNodes = lib.mkDefault cfg.devNodes;
boot.zfs.extraPools = lib.mkIf cfg.storage.enable [ "storage" ];
fileSystems."/".neededForBoot = true;
fileSystems."/etc".neededForBoot = true;
fileSystems."/boot".neededForBoot = true;

View File

@@ -30,7 +30,9 @@ in
loader.efi.canTouchEfiVariables = true;
supportedFilesystems = [ "vfat" "zfs" ];
zfs = {
forceImportAll = true;
requestEncryptionCredentials = true;
};
initrd = {
availableKernelModules = cfg.ethernetDrivers;