refactor: move max into dentritic pattern
This commit is contained in:
27
modules/common/features/image-viewer.nix
Normal file
27
modules/common/features/image-viewer.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ ... }: {
|
||||
flake.homeModules.commonFeatureImageViewer = { pkgs, ... }: {
|
||||
xdg.desktopEntries.imv = {
|
||||
name = "imv";
|
||||
exec = "${pkgs.imv}/bin/imv %F";
|
||||
icon = "imv";
|
||||
};
|
||||
|
||||
xdg.mimeApps = let
|
||||
value = "imv.desktop";
|
||||
|
||||
associations = builtins.listToAttrs (map (name: {
|
||||
inherit name value;
|
||||
}) [
|
||||
"image/png"
|
||||
"image/jpeg"
|
||||
"image/gif"
|
||||
"image/bmp"
|
||||
"image/webp"
|
||||
]);
|
||||
in {
|
||||
enable = true;
|
||||
associations.added = associations;
|
||||
defaultApplications = associations;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user