| 27 Nov 2022 |
@me:linj.tech | In reply to @janne.hess:helsinki-systems.de you probably want cryptsetup.target in that before Mounting /sysroot/nix... is before Reached target Local Encrypted Volumes., so before = [ "cryptsetup.target" ] is not enough I think | 22:39:03 |
@arianvp:matrix.org | `unitConfig.DefaultDependencies=false` | 22:39:09 |
@elvishjerricco:matrix.org | linj: as I understand it, preDeviceCommands in the old initrd basically means pre-udev. That is extremely early. | 22:56:59 |
@me:linj.tech | Arian: your trick works!
pre-device-command = {
description = "pre device command";
wantedBy = [ "cryptsetup.target" ];
wants = [ "cryptsetup-pre.target" ];
before = [ "cryptsetup-pre.target" ];
unitConfig.DefaultDependencies = false;
# serviceConfig = {
# Type = "oneshot";
# RemainAfterExit = true;
# };
script = ''
echo pre-device-command-start
echo pre-device-command-end
'';
};
| 23:01:17 |
@arianvp:matrix.org | Great | 23:01:46 |
@elvishjerricco:matrix.org | linj: I'm very curious what you're trying to achieve | 23:01:51 |
@me:linj.tech | emm, what I want is somewhat weird: generate a keyfile on the fly for luks without storing that keyfile in initrd | 23:03:52 |