summaryrefslogtreecommitdiff
path: root/sys/boot/detached-luks.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sys/boot/detached-luks.nix15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/boot/detached-luks.nix b/sys/boot/detached-luks.nix
index d3e7c29..79241f6 100644
--- a/sys/boot/detached-luks.nix
+++ b/sys/boot/detached-luks.nix
@@ -58,6 +58,14 @@ in {
sleep 2
'';
+ postMountCommands =
+ ''
+ umount /initrd-boot
+ ''
+ + optionalString tpmInitrd ''
+ rm -r /tpm
+ '';
+
luks.devices.${cfg.target} = {
device = cfg.crypt;
header = headerPath;
@@ -96,13 +104,6 @@ in {
unseal_tpm_key
'';
-
- postOpenCommands = mkBefore (''
- umount /initrd-boot
- ''
- + optionalString tpmInitrd ''
- rm -r /tpm
- '');
};
};