NixOS configuration files

browser: switch default browser

Signed-off-by: Naomi Roberts <mia@naomieow.xyz>

lesbian.skin 8a3763eb d916a5dc

verified
+49 -43
+49
modules/desktop/browsers/default.nix
··· 1 + {inputs, ...}: { 2 + flake.modules = { 3 + homeManager.desktop = {pkgs, ...}: { 4 + xdg.mimeApps = let 5 + associations = builtins.listToAttrs (map (name: { 6 + inherit name; 7 + value = let 8 + browser = inputs.helium.packages.${pkgs.stdenv.hostPlatform.system}.default; 9 + in 10 + browser.meta.desktopFile; 11 + }) [ 12 + "application/x-extension-shtml" 13 + "application/x-extension-xhtml" 14 + "application/x-extension-html" 15 + "application/x-extension-xht" 16 + "application/x-extension-htm" 17 + "x-scheme-handler/unknown" 18 + "x-scheme-handler/mailto" 19 + "x-scheme-handler/chrome" 20 + "x-scheme-handler/about" 21 + "x-scheme-handler/https" 22 + "x-scheme-handler/http" 23 + "application/xhtml+xml" 24 + "application/json" 25 + "text/plain" 26 + "text/html" 27 + ]); 28 + in { 29 + associations.added = associations; 30 + defaultApplications = associations; 31 + }; 32 + }; 33 + nixos.desktop = { 34 + environment.etc = { 35 + "1password/custom_allowed_browsers" = { 36 + text = '' 37 + zen 38 + zen-twilight 39 + .zen 40 + .zen-twilight 41 + helium 42 + .helium 43 + ''; 44 + mode = "0755"; 45 + }; 46 + }; 47 + }; 48 + }; 49 + }
-43
modules/desktop/browsers/zen.nix
··· 63 63 }; 64 64 }; 65 65 }; 66 - 67 - xdg.mimeApps = let 68 - associations = builtins.listToAttrs (map (name: { 69 - inherit name; 70 - value = let 71 - zen-browser = zen.packages.${pkgs.stdenv.hostPlatform.system}.twilight; 72 - in 73 - zen-browser.meta.desktopFile; 74 - }) [ 75 - "application/x-extension-shtml" 76 - "application/x-extension-xhtml" 77 - "application/x-extension-html" 78 - "application/x-extension-xht" 79 - "application/x-extension-htm" 80 - "x-scheme-handler/unknown" 81 - "x-scheme-handler/mailto" 82 - "x-scheme-handler/chrome" 83 - "x-scheme-handler/about" 84 - "x-scheme-handler/https" 85 - "x-scheme-handler/http" 86 - "application/xhtml+xml" 87 - "application/json" 88 - "text/plain" 89 - "text/html" 90 - ]); 91 - in { 92 - associations.added = associations; 93 - defaultApplications = associations; 94 - }; 95 - }; 96 - 97 - nixos.desktop = { 98 - environment.etc = { 99 - "1password/custom_allowed_browsers" = { 100 - text = '' 101 - zen 102 - zen-twilight 103 - .zen 104 - .zen-twilight 105 - ''; 106 - mode = "0755"; 107 - }; 108 - }; 109 66 }; 110 67 }; 111 68 }