{ config, lib, pkgs, ... }: let extraPrefs = lib.fileContents ./mozilla.cfg; userChrome = lib.fileContents ./userChrome.css; my-firefox = pkgs.firefox.override { extraPrefs = extraPrefs; }; inherit (lib) mkIf; cfg = config.browsers.firefox; in { config = mkIf cfg.enable { default.browser = lib.mkDefault "firefox"; programs.firefox = { enable = true; package = my-firefox; # import configuration policies = import ./policies.nix; # create profile for me :3 profiles.${config.user} = { search = { force = true; default = "ddg"; }; userChrome = userChrome; }; }; }; }