Convert Vifm configuration to module

This commit is contained in:
Yorick Barbanneau 2023-12-30 13:12:33 +01:00
parent a0e5672290
commit 46384d49c1
8 changed files with 23 additions and 13 deletions

View file

@ -5,7 +5,6 @@
./git.nix
./pass.nix
./gnupg.nix
./vifm
./bat.nix
./eza.nix
./direnv.nix

View file

@ -1,12 +0,0 @@
{ pkgs, ...}:
{
home.packages = with pkgs; [
vifm
chafa # Preview images
poppler_utils # Preview PDF file
];
home.file.".config/vifm/vifmrc".source = ./files/vifmrc;
home.file.".config/vifm/colors/base16-default-dark.vifm".source = ./files/base16-default-dark.vifm;
home.file.".config/vifm/devicons.vifm".source = ./files/devicons.vifm;
}

View file

@ -1,6 +1,7 @@
{ ... }: {
config.modules = {
cli.neovim.enable = true;
cli.vifm.enable = true;
video.kdenlive.enable = false;
web.firefox.enable = true;
web.qutebrowser.enable = true;

View file

@ -0,0 +1,21 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.cli.vifm;
in
{
options.modules.cli.vifm = {
enable = mkEnableOption "enable Vifm file browser";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
vifm
chafa # Preview images
poppler_utils # Preview PDF file
];
home.file.".config/vifm/vifmrc".source = ./files/vifmrc;
home.file.".config/vifm/colors/base16-default-dark.vifm".source = ./files/base16-default-dark.vifm;
home.file.".config/vifm/devicons.vifm".source = ./files/devicons.vifm;
};
}

View file

@ -2,6 +2,7 @@
{
imports = [
./cli/neovim
./cli/vifm
./desktop/sway
./gaming/lutris
./video/kdenlive