From be343218e98e5d0434310c0aad146eba7c57d953 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 20 Jan 2021 03:05:55 -0500 Subject: [PATCH] Add modules/desktop/browsers/brave.nix --- modules/desktop/browsers/brave.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 modules/desktop/browsers/brave.nix diff --git a/modules/desktop/browsers/brave.nix b/modules/desktop/browsers/brave.nix new file mode 100644 index 00000000..ab985404 --- /dev/null +++ b/modules/desktop/browsers/brave.nix @@ -0,0 +1,28 @@ +# modules/browser/brave.nix --- https://publishers.basicattentiontoken.org +# +# A FOSS and privacy-minded browser. + +{ options, config, lib, pkgs, ... }: + +with lib; +with lib.my; +let cfg = config.modules.desktop.browsers.brave; +in { + options.modules.desktop.browsers.brave = { + enable = mkBoolOpt false; + }; + + config = mkIf cfg.enable { + user.packages = with pkgs; [ + brave + (makeDesktopItem { + name = "brave-private"; + desktopName = "Brave Web Browser"; + genericName = "Open a private Brave window"; + icon = "brave"; + exec = "${brave}/bin/brave --incognito"; + categories = "Network"; + }) + ]; + }; +}