From b01a78c74ae95ffae14865ddfd06769555db33e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6gler?= Date: Sun, 16 Feb 2025 16:21:43 +0100 Subject: [PATCH] nixos/clevis: fix luks support Add missing packages when clevis is used for luks unlock It is not needed to expose all execuables via extraBin, therefor removed curl. --- nixos/modules/system/boot/clevis.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/clevis.nix b/nixos/modules/system/boot/clevis.nix index 5867a02b9576..121f0d4cc27f 100644 --- a/nixos/modules/system/boot/clevis.nix +++ b/nixos/modules/system/boot/clevis.nix @@ -77,6 +77,9 @@ in copy_bin_and_libs ${pkgs.jose}/bin/jose copy_bin_and_libs ${pkgs.curl}/bin/curl copy_bin_and_libs ${pkgs.bashNonInteractive}/bin/bash + copy_bin_and_libs ${pkgs.cryptsetup}/bin/cryptsetup + copy_bin_and_libs ${pkgs.gnused}/bin/gnused + copy_bin_and_libs ${pkgs.gnugrep}/bin/gnugrep copy_bin_and_libs ${pkgs.tpm2-tools}/bin/.tpm2-wrapped mv $out/bin/{.tpm2-wrapped,tpm2} @@ -103,13 +106,15 @@ in systemd = { extraBin = lib.mkIf systemd.enable { clevis = "${cfg.package}/bin/clevis"; - curl = "${pkgs.curl}/bin/curl"; }; storePaths = lib.mkIf systemd.enable [ cfg.package "${pkgs.jose}/bin/jose" "${pkgs.curl}/bin/curl" + "${pkgs.cryptsetup}/bin/cryptsetup" + "${pkgs.gnused}/bin/sed" + "${pkgs.gnugrep}/bin/grep" "${pkgs.tpm2-tools}/bin/tpm2_createprimary" "${pkgs.tpm2-tools}/bin/tpm2_flushcontext" "${pkgs.tpm2-tools}/bin/tpm2_load"