aboutsummaryrefslogtreecommitdiffstats
path: root/modules/file-management/lf/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/file-management/lf/default.nix')
-rw-r--r--modules/file-management/lf/default.nix21
1 files changed, 15 insertions, 6 deletions
diff --git a/modules/file-management/lf/default.nix b/modules/file-management/lf/default.nix
index 47a950f..28955ea 100644
--- a/modules/file-management/lf/default.nix
+++ b/modules/file-management/lf/default.nix
@@ -7,7 +7,19 @@
# lf - terminal file manager
{
- config = lib.mkIf config.programs.lf.enable {
+ options.file-management.lf = {
+ enable = lib.mkEnableOption "Enables lf.";
+ package = lib.mkOption {
+ type = lib.types.package;
+ default = pkgs.lf.overrideAttrs (old: {
+ dontWrapQtApps = true;
+ dontPatchShebangs = true;
+ });
+ description = "The lf package to use.";
+ };
+ };
+
+ config = lib.mkIf config.file-management.lf.enable {
xdg.mimeApps.defaultApplications = {
"inode/directory" = "lf.desktop";
};
@@ -17,11 +29,8 @@
];
programs.lf = {
- package = pkgs.lf.overrideAttrs (old: {
- dontWrapQtApps = true;
- dontPatchShebangs = true;
- });
-
+ enable = true;
+ package = config.file-management.lf.package;
settings = {
number = true;
icons = true;