2025-01-28 18:24:07 -05:00

36 lines
706 B
Nix

{
config,
pkgs,
lib,
...
}:
let
cfg = config.nmasur.presets.programs.nsxiv;
in
{
options.nmasur.presets.programs.nsxiv.enable = lib.mkEnableOption "Neo Simple X Image Viewer";
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
nsxiv # Image viewer
];
# Set default program for opening images
xdg.mimeApps = {
associations.added = {
"image/jpeg" = [ "nsxiv.desktop" ];
"image/png" = [ "nsxiv.desktop" ];
"image/*" = [ "nsxiv.desktop" ];
};
defaultApplications = {
"image/jpeg" = [ "nsxiv.desktop" ];
"image/png" = [ "nsxiv.desktop" ];
"image/*" = [ "nsxiv.desktop" ];
};
};
};
}