🚀 add xdg-mime
parent
9aaba816a2
commit
0d65a4379d
|
@ -7,6 +7,7 @@
|
|||
./kitty.nix
|
||||
./rofi
|
||||
./spotify.nix
|
||||
./xdg-mime.nix
|
||||
./zathura.nix
|
||||
];
|
||||
home-manager.users.moritz = {
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
browser = [ "firefox.desktop" ];
|
||||
associations = {
|
||||
"text/html" = browser;
|
||||
"x-scheme-handler/http" = browser;
|
||||
"x-scheme-handler/https" = browser;
|
||||
"x-scheme-handler/ftp" = browser;
|
||||
"x-scheme-handler/chrome" = browser;
|
||||
"x-scheme-handler/about" = browser;
|
||||
"x-scheme-handler/unknown" = browser;
|
||||
"application/x-extension-htm" = browser;
|
||||
"application/x-extension-html" = browser;
|
||||
"application/x-extension-shtml" = browser;
|
||||
"application/xhtml+xml" = browser;
|
||||
"application/x-extension-xhtml" = browser;
|
||||
"application/x-extension-xht" = browser;
|
||||
};
|
||||
in {
|
||||
home-manager.users.moritz = {
|
||||
xdg.mime.enable = true;
|
||||
xdg.mimeApps.enable = true;
|
||||
xdg.mimeApps.associations.added = associations;
|
||||
xdg.mimeApps.defaultApplications = associations;
|
||||
xdg.desktopEntries = {
|
||||
firefox = {
|
||||
name = "Firefox";
|
||||
genericName = "Web Browser";
|
||||
exec = "${pkgs.firefox}/bin/firefox %U";
|
||||
terminal = false;
|
||||
categories = [ "Application" "Network" "WebBrowser" ];
|
||||
mimeType = [
|
||||
"text/html"
|
||||
"text/xml"
|
||||
"x-scheme-handler/http"
|
||||
"x-scheme-handler/https"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue