This commit is contained in:
Leon Schwarzäugl 2025-11-18 17:08:23 +01:00
parent e31a97b6ab
commit 40e1adc402
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
4 changed files with 124 additions and 358 deletions

View file

@ -54,21 +54,18 @@ in
];
services = {
unlock-luks = {
description = "Unlock LUKS encrypted root device";
wantedBy = [ "initrd.target" ];
after = [ "network-online.target" ];
before = [ "sysroot.mount" ];
after = [ "network.target" ];
before = [ "systemd-cryptsetup@cryptroot.service" ];
path = [ "/bin" ];
# Configure how the service behaves
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
};
# The actual commands to unlock the drive
script = ''
echo "systemctl default >> /root/.profile"
echo "systemctl default" >> /root/.profile
'';
};
};