mirror of
https://github.com/nmasur/dotfiles
synced 2025-01-31 08:42:02 +00:00
36 lines
706 B
Nix
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" ];
|
|
};
|
|
};
|
|
};
|
|
}
|