From edcc636fd057a4393d8bdc49fefa0bebe805ccfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 14 Mar 2023 09:15:46 +0100 Subject: [PATCH 1/8] linux-bcachefs: 6.1.0-2023-02-01 -> 6.2.0-2023-03-13 --- linux-testing-bcachefs.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/linux-testing-bcachefs.nix b/linux-testing-bcachefs.nix index ed54a29..e45ff81 100644 --- a/linux-testing-bcachefs.nix +++ b/linux-testing-bcachefs.nix @@ -8,14 +8,14 @@ } @ args: buildLinux (args // { # NOTE: bcachefs-tools should be updated simultaneously to preserve compatibility - version = "6.1.0-2023-02-01"; - modDirVersion = "6.1.0"; + version = "6.2.0-2023-03-13"; + modDirVersion = "6.2.0"; src = fetchFromGitHub { owner = "koverstreet"; repo = "bcachefs"; - rev = "52851ef710d4b906d07d9647e50a97a9e9e5a909"; - sha256 = "sha256-n00qPtHHEHt3FSIRMoP9IJFAdQJNNwabg+WAKppSAS8="; + rev = "dc2c35d5b4638fc3c569f7630da8782b096fb819"; + sha256 = "sha256-UsSEMeP/itLBzQR/mwt4lAR2rBmqJI9cKjZFI+Lb9cY="; }; kernelPatches = (args.kernelPatches or [ ]) ++ [{ From 2682530302aabda324928b7fc705d7f59a501d39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 15 Mar 2023 20:59:55 +0100 Subject: [PATCH 2/8] lvm_vg: allow putting unmounted disks into lvm --- types/lvm_vg.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/lvm_vg.nix b/types/lvm_vg.nix index ac7c2fa..70845ff 100644 --- a/types/lvm_vg.nix +++ b/types/lvm_vg.nix @@ -44,7 +44,7 @@ vgchange -a y ${lib.concatMapStrings (x: x.dev or "") (lib.attrValues lvMounts)} ''; - fs = lvMounts.fs; + fs = lvMounts.fs or { }; }; }; _config = lib.mkOption { From adf7d4335ac13e5149291e76741048fa89f4fc6f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 16 Mar 2023 01:36:08 +0000 Subject: [PATCH 3/8] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/796b4a3c1d903c4b9270cd2548fe46f524eeb886' (2023-03-12) → 'github:NixOS/nixpkgs/126f49a01de5b7e35a43fd43f891ecf6d3a51459' (2023-03-15) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 1d0d394..a33af64 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1678594102, - "narHash": "sha256-OHAHYiMWJFPNxuW/PcOMlSD2tvXnEYC1jxREBADHwwQ=", + "lastModified": 1678875422, + "narHash": "sha256-T3o6NcQPwXjxJMn2shz86Chch4ljXgZn746c2caGxd8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "796b4a3c1d903c4b9270cd2548fe46f524eeb886", + "rev": "126f49a01de5b7e35a43fd43f891ecf6d3a51459", "type": "github" }, "original": { From 1c9c199e49288e0dcb781c91125e4b53d3935128 Mon Sep 17 00:00:00 2001 From: Maxime Brunet Date: Fri, 17 Mar 2023 16:45:07 -0700 Subject: [PATCH 4/8] fix(cli): pass --root-mountpoint value as string --- disko | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disko b/disko index c84cf52..817c5b6 100755 --- a/disko +++ b/disko @@ -72,7 +72,7 @@ while [[ $# -gt 0 ]]; do dry_run=y ;; --root-mountpoint) - nix_args+=(--arg rootMountPoint "$2") + nix_args+=(--argstr rootMountPoint "$2") shift ;; --no-deps) From 74a2eba283406e4a68a576e6389885ae29e4ae24 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Mar 2023 01:38:13 +0000 Subject: [PATCH 5/8] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/126f49a01de5b7e35a43fd43f891ecf6d3a51459' (2023-03-15) → 'github:NixOS/nixpkgs/5a05160f7671434e1c833b1b01284b876e04eca4' (2023-03-19) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index a33af64..27d3386 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1678875422, - "narHash": "sha256-T3o6NcQPwXjxJMn2shz86Chch4ljXgZn746c2caGxd8=", + "lastModified": 1679198465, + "narHash": "sha256-VfXpHpniNWgg7pBzxb20pRX7kqn80LApPDQYTReiFCw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "126f49a01de5b7e35a43fd43f891ecf6d3a51459", + "rev": "5a05160f7671434e1c833b1b01284b876e04eca4", "type": "github" }, "original": { From 4db8159a19facd466dd741ff345395832be9cb7e Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 21 Mar 2023 06:34:11 +0100 Subject: [PATCH 6/8] table: fix mounting devices --- types/table.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/types/table.nix b/types/table.nix index fee81a5..b47ed29 100644 --- a/types/table.nix +++ b/types/table.nix @@ -38,9 +38,7 @@ partMounts = diskoLib.deepMergeMap (partition: partition._mount { inherit dev; }) config.partitions; in { - dev = '' - ${lib.concatMapStrings (x: x.dev or "") (lib.attrValues partMounts)} - ''; + dev = partMounts.dev or ""; fs = partMounts.fs or { }; }; }; From 0577409d12d24740af81056ead671f2cce8d3e8e Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Tue, 21 Mar 2023 19:41:39 +0100 Subject: [PATCH 7/8] luks: rename extraArgs to extraFormatArgs, add extraOpenArgs --- example/complex.nix | 4 ++-- example/luks-lvm.nix | 1 + types/luks.nix | 14 ++++++++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/example/complex.nix b/example/complex.nix index 939f71e..1c02ef9 100644 --- a/example/complex.nix +++ b/example/complex.nix @@ -39,7 +39,7 @@ type = "luks"; name = "crypted1"; keyFile = "/tmp/secret.key"; - extraArgs = [ + extraFormatArgs = [ "--iter-time 1" ]; content = { @@ -67,7 +67,7 @@ type = "luks"; name = "crypted2"; keyFile = "/tmp/secret.key"; - extraArgs = [ + extraFormatArgs = [ "--iter-time 1" ]; content = { diff --git a/example/luks-lvm.nix b/example/luks-lvm.nix index a6879ce..51cd24c 100644 --- a/example/luks-lvm.nix +++ b/example/luks-lvm.nix @@ -30,6 +30,7 @@ content = { type = "luks"; name = "crypted"; + extraOpenArgs = [ "--allow-discards" ]; keyFile = "/tmp/secret.key"; content = { type = "lvm_pv"; diff --git a/types/luks.nix b/types/luks.nix index 90fcdcc..350a238 100644 --- a/types/luks.nix +++ b/types/luks.nix @@ -15,10 +15,16 @@ default = null; description = "Path to the key for encryption"; }; - extraArgs = lib.mkOption { + extraFormatArgs = lib.mkOption { type = lib.types.listOf lib.types.str; default = [ ]; - description = "Extra arguments"; + description = "Extra arguments to pass to `cryptsetup luksFormat` when formatting"; + }; + extraOpenArgs = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = [ ]; + description = "Extra arguments to pass to `cryptsetup luksOpen` when opening"; + example = [ "--allow-discards" ]; }; content = diskoLib.deviceType; _meta = lib.mkOption { @@ -32,8 +38,8 @@ _create = diskoLib.mkCreateOption { inherit config options; default = { dev }: '' - cryptsetup -q luksFormat ${dev} ${diskoLib.maybeStr config.keyFile} ${toString config.extraArgs} - cryptsetup luksOpen ${dev} ${config.name} ${lib.optionalString (config.keyFile != null) "--key-file ${config.keyFile}"} + cryptsetup -q luksFormat ${dev} ${diskoLib.maybeStr config.keyFile} ${toString config.extraFormatArgs} + cryptsetup luksOpen ${dev} ${config.name} ${toString config.extraOpenArgs} ${lib.optionalString (config.keyFile != null) "--key-file ${config.keyFile}"} ${lib.optionalString (config.content != null) (config.content._create {dev = "/dev/mapper/${config.name}";})} ''; }; From ee0ebf21fe466118230cc50adf4060023d7a1aab Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 23 Mar 2023 01:24:28 +0000 Subject: [PATCH 8/8] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/5a05160f7671434e1c833b1b01284b876e04eca4' (2023-03-19) → 'github:NixOS/nixpkgs/c9ece0059f42e0ab53ac870104ca4049df41b133' (2023-03-21) --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 27d3386..c049394 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1679198465, - "narHash": "sha256-VfXpHpniNWgg7pBzxb20pRX7kqn80LApPDQYTReiFCw=", + "lastModified": 1679410443, + "narHash": "sha256-xDHO/jixWD+y5pmW5+2q4Z4O/I/nA4MAa30svnZKK+M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5a05160f7671434e1c833b1b01284b876e04eca4", + "rev": "c9ece0059f42e0ab53ac870104ca4049df41b133", "type": "github" }, "original": {