{ config, lib, pkgs, ... }: let cfg = config.profiles.browsing; in { options.profiles.browsing = { enable = lib.mkEnableOption "A profile that enables a browser for the GUI and the terminal"; }; config = lib.mkIf cfg.enable { home.packages = with pkgs; [ lynx ] ++ pkgs.lib.optionals (pkgs.stdenv.isLinux) [ # TODO: currently broken/doesn't support Darwin pkgs.firefox ]; programs.qutebrowser = { enable = true; searchEngines = { DEFAULT = "https://opnxng.com/search?q={}"; g = "https://www.google.com/search?hl=en&q={}"; ddg = "https://www.duckduckgo.com/?q={}"; nw = "https://nixos.wiki/index.php?search={}"; ns = "https://search.nixos.org/options?channel=unstable&from=0size=50&sort=relevance&type=packages&query={}"; np = "https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query={}"; rd = "https://docs.rs/releases/search?query={}"; rp = "https://lib.rs/search?q={}"; }; quickmarks = { github = "https://github.com"; sourcehut = "https://sr.ht"; }; settings = import ./qutebrowser-settings.nix // { url.default_page = "https://opnxng.com"; url.start_pages = "https://opnxng.com"; }; }; }; }