cryptroot open

This commit is contained in:
2026-04-13 16:19:33 +02:00
parent 7009fe51a2
commit 7285adfea8
+4
View File
@@ -9,6 +9,9 @@ let
bashWrapper = pkgs.writeShellScriptBin "bash" '' bashWrapper = pkgs.writeShellScriptBin "bash" ''
exec /usr/bin/env bash "$@" exec /usr/bin/env bash "$@"
''; '';
cryptrootUnlockWrapper = pkgs.writeShellScriptBin "cryptroot-unlock" ''
exec /run/current-system/sw/bin/systemd-tty-ask-password-agent --query --watch "$@"
'';
in in
{ {
options.my.binBashWrapper.enable = lib.mkEnableOption "create a /bin/bash wrapper"; options.my.binBashWrapper.enable = lib.mkEnableOption "create a /bin/bash wrapper";
@@ -16,6 +19,7 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"L+ /bin/bash - - - - ${bashWrapper}/bin/bash" "L+ /bin/bash - - - - ${bashWrapper}/bin/bash"
"L+ /bin/cryptroot-unlock - - - - ${cryptrootUnlockWrapper}/bin/cryptroot-unlock"
]; ];
}; };
} }