vifm: add module
This commit is contained in:
parent
342a1d6823
commit
5828309542
8 changed files with 88 additions and 1 deletions
33
modules/programs/vifm.nix
Normal file
33
modules/programs/vifm.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
|
||||
inherit (lib) mkIf mkOption types;
|
||||
|
||||
cfg = config.programs.vifm;
|
||||
|
||||
in {
|
||||
meta.maintainers = [ lib.hm.maintainers.aabccd021 ];
|
||||
|
||||
options.programs.vifm = {
|
||||
enable = lib.mkEnableOption "vifm, a Vim-like file manager";
|
||||
|
||||
package = lib.mkPackageOption pkgs "vifm" { };
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example = "mark h ~/";
|
||||
description = ''
|
||||
Extra lines added to the {file}`$XDG_CONFIG_HOME/vifm/vifmrc` file.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile."vifm/vifmrc" =
|
||||
mkIf (cfg.extraConfig != "") { text = cfg.extraConfig; };
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue