Convert Zathura configuration to module

This commit is contained in:
Yorick Barbanneau 2023-12-30 13:45:59 +01:00
parent 5eb724a0c4
commit 98be8e8da4
5 changed files with 27 additions and 14 deletions

View file

@ -1,13 +0,0 @@
_: {
programs.zathura = {
enable = true;
options = {
selection-clipboard = "clipboard";
font = "Fira Sans 12";
recolor = true;
};
};
xdg.mimeApps.defaultApplications = {
"application/pdf" = "org.pwmt.zathura.desktop";
};
}

View file

@ -1,5 +1,8 @@
{ ... }: { { ... }: {
config.modules = { config.modules = {
application = {
zathura.enable = true;
};
cli.neovim.enable = true; cli.neovim.enable = true;
cli.vifm.enable = true; cli.vifm.enable = true;
video.kdenlive.enable = false; video.kdenlive.enable = false;

View file

@ -0,0 +1,23 @@
{ lib, config, ... }:
with lib;
let
cfg = config.modules.application.zathura;
in
{
options.modules.application.zathura = {
enable = mkEnableOption "enable Zathura PDF viewer";
};
config = mkIf cfg.enable {
programs.zathura = {
enable = true;
options = {
selection-clipboard = "clipboard";
font = "Fira Sans 12";
recolor = true;
};
};
xdg.mimeApps.defaultApplications = {
"application/pdf" = "org.pwmt.zathura.desktop";
};
};
}

View file

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

View file

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