configure xdg mimes
This commit is contained in:
parent
114bbe8abf
commit
1661cecccc
2 changed files with 32 additions and 6 deletions
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./gtk.nix
|
./gtk.nix
|
||||||
|
./xdg.nix
|
||||||
|
|
||||||
./alacritty.nix
|
./alacritty.nix
|
||||||
./neovim.nix
|
./neovim.nix
|
||||||
|
|
@ -39,12 +40,6 @@
|
||||||
./i3.nix
|
./i3.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
xdg = {
|
|
||||||
enable = true;
|
|
||||||
mime.enable = true;
|
|
||||||
mimeApps.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
feh.enable = true;
|
feh.enable = true;
|
||||||
|
|
||||||
|
|
|
||||||
31
users/rin/xdg.nix
Normal file
31
users/rin/xdg.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
{ config, ... }:
|
||||||
|
let
|
||||||
|
genFF = mimeTypes: builtins.listToAttrs (builtins.map (mimeType: {
|
||||||
|
name = mimeType;
|
||||||
|
value = "firefox.desktop";
|
||||||
|
}) mimeTypes);
|
||||||
|
|
||||||
|
ffMimes = genFF [
|
||||||
|
"x-scheme-handler/http"
|
||||||
|
"x-scheme-handler/https"
|
||||||
|
"x-scheme-handler/chrome"
|
||||||
|
"text/html"
|
||||||
|
"application/x-extension-htm"
|
||||||
|
"application/x-extension-html"
|
||||||
|
"application/x-extension-shtml"
|
||||||
|
"application/xhtml+xml"
|
||||||
|
"application/x-extension-xhtml"
|
||||||
|
"application/x-extension-xht"
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
xdg = {
|
||||||
|
enable = true;
|
||||||
|
mime.enable = true;
|
||||||
|
mimeApps = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
associations.added = ffMimes;
|
||||||
|
defaultApplications = ffMimes;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue