Commit 5b4d1acb authored by Robert Rose's avatar Robert Rose
Browse files

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.
parent 325dc738
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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