Convert Imv configuration to module

This commit is contained in:
Yorick Barbanneau 2023-12-30 17:42:26 +01:00
parent 98be8e8da4
commit e2df40e518
4 changed files with 19 additions and 6 deletions

View file

@ -1,5 +0,0 @@
_: {
programs.imv = {
enable = true;
};
}

View file

@ -0,0 +1,18 @@
{ lib, config, ... }:
with lib;
let
cfg = config.modules.application.zathura;
in
{
options.modules.application.imv = {
enable = mkEnableOption "enable IMV image viewer";
};
config = mkIf cfg.enable {
programs.imv = {
enable = true;
};
xdg.mimeApps.defaultApplications = {
"image/*" = "imv-dir.desktop";
};
};
}

View file

@ -1,6 +1,7 @@
{ ... }:
{
imports = [
./application/imv
./application/zathura
./cli/neovim
./cli/vifm

View file

@ -67,7 +67,6 @@
] ++ (if hostConfig.desktop then
[
../home-manager/foot.nix
../home-manager/imv.nix
../home-manager/mpv
]
else []