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