diff --git a/home/linux.nix b/home/linux.nix index 11d3834..0dc7905 100644 --- a/home/linux.nix +++ b/home/linux.nix @@ -53,6 +53,7 @@ ../modules/tmux ../modules/tmuxinator/personal.nix ../modules/zen + ../modules/librewolf ../modules/wm/swaync ../modules/wm/cliphist ../modules/wm/awww diff --git a/modules/librewolf/default.nix b/modules/librewolf/default.nix new file mode 100644 index 0000000..e588361 --- /dev/null +++ b/modules/librewolf/default.nix @@ -0,0 +1,170 @@ +{ + inputs, + pkgs, + ... +}: + +{ + programs.librewolf = { + enable = true; + nativeMessagingHosts = [ pkgs.firefoxpwa ]; + policies = { + AutofillAddressEnabled = true; + AutofillCreditCardEnabled = false; + DisableAppUpdate = true; + DisableFeedbackCommands = true; + DisableFirefoxStudies = true; + DisablePocket = true; + DisableTelemetry = true; + DontCheckDefaultBrowser = true; + NoDefaultBookmarks = true; + OfferToSaveLogins = false; + EnableTrackingProtection = { + Value = true; + Locked = true; + Cryptomining = true; + Fingerprinting = true; + }; + }; + settings = { + "webgl.disabled" = false; + "privacy.clearOnShutdown.history" = false; + "privacy.clearOnShutdown.cookies" = false; + }; + profiles.default = { + isDefault = true; + name = "default"; + settings = { + "layout.css.prefers-color-scheme.content-override" = 0; + }; + + bookmarks = { + force = true; + settings = [ + { + name = "Home"; + url = "https://home.dnsc.io"; + } + "separator" + { + name = "Nix Packages"; + url = "https://search.nixos.org/packages"; + } + { + name = "Nix Options"; + url = "https://search.nixos.org/options"; + } + { + name = "Home Manager"; + url = "https://home-manager-options.extranix.com/"; + } + ]; + }; + + containers = { + containersForce = true; + default = { + name = "personal"; + color = "turquoise"; + icon = "chill"; + id = 1; + }; + }; + + search = { + default = "google"; + force = true; + + google.metaData.alias = "@g"; + bing.metaData.hidden = true; + + engines = { + nix-packages = { + name = "Nix Packages"; + urls = [ + { + template = "https://search.nixos.org/packages"; + params = [ + { + name = "type"; + value = "packages"; + } + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; + + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@np" ]; + }; + + nix-options = { + name = "Nix Options"; + urls = [ + { + template = "https://search.nixos.org/options"; + params = [ + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; + + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@no" ]; + }; + + nix-home-manager = { + name = "Nix Home Manager"; + urls = [ + { + template = "https://home-manager-options.extranix.com"; + params = [ + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; + + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@nh" ]; + }; + + nix-wiki = { + name = "Nix Wiki"; + urls = [ + { + template = "https://wiki.nixos.org/w/index.php"; + params = [ + { + name = "search"; + value = "{searchTerms}"; + } + ]; + } + ]; + + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@nw" ]; + }; + }; + }; + + extensions.force = true; + extensions.packages = with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [ + ublock-origin + dearrow + bitwarden + sponsorblock + vimium + ]; + }; + }; +}