mirror of
https://github.com/nix-community/disko
synced 2024-11-10 06:14:14 +00:00
add luks.extraArgs
This commit is contained in:
parent
0e8c5d1e67
commit
e8f7aa94c2
2 changed files with 5 additions and 1 deletions
|
@ -29,6 +29,10 @@
|
|||
algo = "aes-xts...";
|
||||
name = "crypted";
|
||||
keyfile = "/tmp/secret.key";
|
||||
extraArgs = [
|
||||
"--hash sha512"
|
||||
"--iter-time 5000"
|
||||
];
|
||||
content = {
|
||||
type = "lvm";
|
||||
name = "pool";
|
||||
|
|
|
@ -43,7 +43,7 @@ let {
|
|||
'';
|
||||
|
||||
create.luks = q: x: ''
|
||||
cryptsetup -q luksFormat ${q.device} ${x.keyfile}
|
||||
cryptsetup -q luksFormat ${q.device} ${x.keyfile} ${toString (x.extraArgs or [])}
|
||||
cryptsetup luksOpen ${q.device} ${x.name} --key-file ${x.keyfile}
|
||||
${body.create { device = "/dev/mapper/${x.name}"; } x.content}
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue