summaryrefslogtreecommitdiffstats
path: root/lass/3modules/browsers.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2021-06-06 19:15:44 +0200
committermakefu <github@syntax-fehler.de>2021-06-06 19:15:44 +0200
commit74058abe0b5da0753c2167d6bab29eb1eae88366 (patch)
tree748e9e75c0498161629597f7469933e69303168b /lass/3modules/browsers.nix
parent88a845f7a1a037bf6bcf23863d41f36c4cedcd7e (diff)
parenta5bc9126db72f59062ff9d6a72b2fa35437b42cb (diff)
Merge branch '21.05'
Diffstat (limited to 'lass/3modules/browsers.nix')
-rw-r--r--lass/3modules/browsers.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/lass/3modules/browsers.nix b/lass/3modules/browsers.nix
index 0c77d4da8..4171abdb6 100644
--- a/lass/3modules/browsers.nix
+++ b/lass/3modules/browsers.nix
@@ -5,7 +5,9 @@ let
cfg = config.lass.browser;
browserScripts = {
- chromium = "${pkgs.chromium}/bin/chromium";
+ brave = "${pkgs.brave}/bin/brave";
+ chrome = "${pkgs.google-chrome}/bin/chrome";
+ chromium = "${pkgs.ungoogled-chromium}/bin/chromium";
firefox = "${pkgs.firefox.override {
extraNativeMessagingHosts = [ pkgs.tridactyl-native ];
}}/bin/firefox";
@@ -14,8 +16,9 @@ let
browser-select = let
sortedPaths = sort (a: b: a.value.precedence > b.value.precedence)
+ (filter (x: ! x.value.hidden)
(mapAttrsToList (name: value: { inherit name value; })
- cfg.config);
+ cfg.config));
in if (lib.length sortedPaths) > 1 then
pkgs.writeScriptBin "browser-select" ''
BROWSER=$(echo -e "${concatStringsSep "\\n" (map (getAttr "name") sortedPaths)}" | ${pkgs.dmenu}/bin/dmenu)
@@ -48,6 +51,10 @@ in {
type = types.str;
default = config._module.args.name;
};
+ hidden = mkOption {
+ type = types.bool;
+ default = false;
+ };
precedence = mkOption {
type = types.int;
default = 0;
@@ -58,7 +65,7 @@ in {
};
browser = mkOption {
type = types.enum (attrNames browserScripts);
- default = "chromium";
+ default = "brave";
};
groups = mkOption {
type = types.listOf types.str;