mirror of
https://github.com/nix-community/disko.git
synced 2026-12-02 14:03:28 +01:00
luks: probe detached headers
This commit is contained in:
1 parent
2dfbf0dcb0
commit
93ec363394
1 file changed
+6
-1
+6
-1
@@ -10,6 +10,11 @@
|
|||||||
let
|
let
|
||||||
# These options will automatically generate a temporary password and remove it later on.
|
# These options will automatically generate a temporary password and remove it later on.
|
||||||
autogeneratedPassword = config.enrollFido2;
|
autogeneratedPassword = config.enrollFido2;
|
||||||
|
luksProbeTarget =
|
||||||
|
if config.settings ? "header" && config.settings.header != null then
|
||||||
|
config.settings.header
|
||||||
|
else
|
||||||
|
config.device;
|
||||||
|
|
||||||
keyFile =
|
keyFile =
|
||||||
if config.settings ? "keyFile" then
|
if config.settings ? "keyFile" then
|
||||||
@@ -199,7 +204,7 @@ in
|
|||||||
_create = diskoLib.mkCreateOption {
|
_create = diskoLib.mkCreateOption {
|
||||||
inherit config options;
|
inherit config options;
|
||||||
default = ''
|
default = ''
|
||||||
if ! blkid "${config.device}" >/dev/null || ! cryptsetup isLuks "${config.device}"; then
|
if ! cryptsetup isLuks "${luksProbeTarget}"; then
|
||||||
${lib.optionalString config.askPassword ''
|
${lib.optionalString config.askPassword ''
|
||||||
promptSecret() {
|
promptSecret() {
|
||||||
prompt=$1
|
prompt=$1
|
||||||
|
|||||||
Reference in new issue
Block a user