This commit is contained in:
Leon Schwarzäugl 2025-11-18 17:08:23 +01:00 committed by Leon Schwarzäugl
parent 6abf5ce39b
commit 46f2ec8b96
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
'';
};
};