My NixOS dotfiles.
1{
2 inputs,
3 system,
4 pkgs,
5 ...
6}: {
7 programs.zen-browser = {
8 enable = true;
9 nativeMessagingHosts = [pkgs.firefoxpwa];
10
11 profiles = {
12 "Default Profile" = {
13 };
14 };
15 };
16
17 xdg.mimeApps = let
18 value = let
19 zen-browser = inputs.zen-browser.packages.${system}.beta; # or twilight
20 in
21 zen-browser.meta.desktopFileName;
22
23 associations = builtins.listToAttrs (map (name: {
24 inherit name value;
25 }) [
26 "application/x-extension-shtml"
27 "application/x-extension-xhtml"
28 "application/x-extension-html"
29 "application/x-extension-xht"
30 "application/x-extension-htm"
31 "x-scheme-handler/unknown"
32 "x-scheme-handler/mailto"
33 "x-scheme-handler/chrome"
34 "x-scheme-handler/about"
35 "x-scheme-handler/https"
36 "x-scheme-handler/http"
37 "application/xhtml+xml"
38 "application/json"
39 "text/plain"
40 "text/html"
41 ]);
42 in {
43 associations.added = associations;
44 defaultApplications = associations;
45 };
46
47 stylix.targets.zen-browser.profileNames = ["Default Profile"];
48}