WIP: Add more options to crypt mounts
This commit is contained in:
parent
e9a7d836ce
commit
35f22d8f6a
2 changed files with 35 additions and 17 deletions
|
@ -1,3 +1,12 @@
|
|||
let
|
||||
cryptOpenArgs = [
|
||||
"--allow-discards"
|
||||
"--perf-same_cpu_crypt"
|
||||
"--perf-submit_from_crypt_cpus"
|
||||
"--perf-no_read_workqueue"
|
||||
"--perf-no_write_workqueue"
|
||||
];
|
||||
in
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
|
@ -15,7 +24,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "cryptboot_1";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
extraOpenArgs = cryptOpenArgs;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
additionalKeyFiles = [ ];
|
||||
# content is empty here as the btrfs partition will be created via extraArgs of the cryptroot_1 partition def
|
||||
|
@ -26,7 +35,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "cryptswap_1";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
extraOpenArgs = cryptOpenArgs;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
additionalKeyFiles = [ ];
|
||||
content = {
|
||||
|
@ -51,7 +60,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "cryptboot_0";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
extraOpenArgs = cryptOpenArgs;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
additionalKeyFiles = [ ];
|
||||
content = {
|
||||
|
|
|
@ -64,6 +64,15 @@
|
|||
# /mnt
|
||||
#
|
||||
##############################
|
||||
let
|
||||
cryptOpenArgs = [
|
||||
"--allow-discards"
|
||||
"--perf-same_cpu_crypt"
|
||||
"--perf-submit_from_crypt_cpus"
|
||||
"--perf-no_read_workqueue"
|
||||
"--perf-no_write_workqueue"
|
||||
];
|
||||
in
|
||||
{
|
||||
# The manual definitions are generated by nixos-generate-config
|
||||
# the commented out stuff are partitions created by disko
|
||||
|
@ -103,7 +112,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "crypted_ssd0";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
extraOpenArgs = cryptOpenArgs;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
additionalKeyFiles = [ ];
|
||||
};
|
||||
|
@ -113,7 +122,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "crypted_swap0";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
extraOpenArgs = cryptOpenArgs;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
additionalKeyFiles = [ ];
|
||||
content = {
|
||||
|
@ -149,7 +158,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "crypted_ssd1";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
extraOpenArgs = cryptOpenArgs;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
additionalKeyFiles = [ ];
|
||||
};
|
||||
|
@ -159,7 +168,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "crypted_swap1";
|
||||
extraOpenArgs = [ "--allow-discards " ];
|
||||
extraOpenArgs = cryptOpenArgs;
|
||||
passwordFile = "/tmp/secret.key ";
|
||||
additionalKeyFiles = [ ];
|
||||
content = {
|
||||
|
@ -182,7 +191,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "crypted_hdd0";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
extraOpenArgs = cryptOpenArgs;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
additionalKeyFiles = [ ];
|
||||
};
|
||||
|
@ -201,7 +210,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "crypted_hdd1";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
extraOpenArgs = cryptOpenArgs;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
additionalKeyFiles = [ ];
|
||||
};
|
||||
|
@ -220,7 +229,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "crypted_hdd2";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
extraOpenArgs = cryptOpenArgs;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
additionalKeyFiles = [ ];
|
||||
};
|
||||
|
@ -239,7 +248,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "crypted_hdd3";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
extraOpenArgs = cryptOpenArgs;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
additionalKeyFiles = [ ];
|
||||
};
|
||||
|
@ -258,7 +267,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "crypted_hdd4";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
extraOpenArgs = cryptOpenArgs;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
additionalKeyFiles = [ ];
|
||||
};
|
||||
|
@ -277,7 +286,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "crypted_hdd5";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
extraOpenArgs = cryptOpenArgs;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
additionalKeyFiles = [ ];
|
||||
};
|
||||
|
@ -296,7 +305,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "crypted_hdd6";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
extraOpenArgs = cryptOpenArgs;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
additionalKeyFiles = [ ];
|
||||
};
|
||||
|
@ -315,7 +324,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "crypted_hdd7";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
extraOpenArgs = cryptOpenArgs;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
additionalKeyFiles = [ ];
|
||||
};
|
||||
|
@ -334,7 +343,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "crypted_hdd8";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
extraOpenArgs = cryptOpenArgs;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
additionalKeyFiles = [ ];
|
||||
};
|
||||
|
@ -353,7 +362,7 @@
|
|||
content = {
|
||||
type = "luks";
|
||||
name = "crypted_hdd9";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
extraOpenArgs = cryptOpenArgs;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
additionalKeyFiles = [ ];
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue