nixos/lvm: add option for adding lvresize_fs_helper to config

Adding `lvresize_fs_helper` unconditionally to the config pulls in bash
and thus defeats the efforts of enabling lvm without pulling in bash.
This commit is contained in:
Robert Rose
2026-03-24 13:48:27 +01:00
parent 325dc7385e
commit 5b4d1acbf5
+5 -1
View File
@@ -22,6 +22,10 @@ in
'';
};
resizeHelper.enable = mkEnableOption "lvresize_fs_helper" // {
default = true;
};
package = mkOption {
type = types.package;
default = pkgs.lvm2;
@@ -60,7 +64,7 @@ in
services.udev.packages = [ cfg.package.out ];
environment.etc."lvm/lvm.conf".text =
"global/lvresize_fs_helper_executable = ${pkgs.lvm2.scripts}/libexec/lvresize_fs_helper";
mkIf cfg.resizeHelper.enable "global/lvresize_fs_helper_executable = ${pkgs.lvm2.scripts}/libexec/lvresize_fs_helper";
})
(mkIf config.boot.initrd.services.lvm.enable {
# We need lvm2 for the device-mapper rules