mirror of
https://github.com/nix-community/disko
synced 2024-11-10 06:14:14 +00:00
luks: use allowDiscards option
This commit is contained in:
parent
944d338d24
commit
548962c50b
4 changed files with 17 additions and 11 deletions
|
@ -24,11 +24,13 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "crypted";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
# if you want to use the key for interactive login be sure there is no trailing newline
|
||||
# for example use `echo -n "password" > /tmp/secret.key`
|
||||
#passwordFile = "/tmp/secret.key"; # Interactive
|
||||
settings.keyFile = "/tmp/secret.key";
|
||||
settings = {
|
||||
allowDiscards = true;
|
||||
# if you want to use the key for interactive login be sure there is no trailing newline
|
||||
# for example use `echo -n "password" > /tmp/secret.key`
|
||||
#passwordFile = "/tmp/secret.key"; # Interactive
|
||||
keyFile = "/tmp/secret.key";
|
||||
};
|
||||
additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
||||
content = {
|
||||
type = "btrfs";
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "crypted";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
settings.allowDiscards = true;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
|
|
|
@ -24,10 +24,13 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "crypted";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
# if you want to use the key for interactive login be sure there is no trailing newline
|
||||
# for example use `echo -n "password" > /tmp/secret.key`
|
||||
settings.keyFile = "/tmp/secret.key";
|
||||
extraOpenArgs = [ ];
|
||||
settings = {
|
||||
# if you want to use the key for interactive login be sure there is no trailing newline
|
||||
# for example use `echo -n "password" > /tmp/secret.key`
|
||||
keyFile = "/tmp/secret.key";
|
||||
allowDiscards = true;
|
||||
};
|
||||
additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
|
|
|
@ -62,6 +62,7 @@ in
|
|||
keyFileSize = 2048;
|
||||
keyFileOffset = 1024;
|
||||
fallbackToPassword = true;
|
||||
allowDiscards = true;
|
||||
};
|
||||
'';
|
||||
};
|
||||
|
@ -86,7 +87,7 @@ in
|
|||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
description = "Extra arguments to pass to `cryptsetup luksOpen` when opening";
|
||||
example = [ "--allow-discards" ];
|
||||
example = [ "--timeout 10" ];
|
||||
};
|
||||
content = diskoLib.deviceType { parent = config; device = "/dev/mapper/${config.name}"; };
|
||||
_parent = lib.mkOption {
|
||||
|
|
Loading…
Reference in a new issue