diff options
| author | Miran Bastaja <miran.bastaja04@gmail.com> | 2023-11-03 15:59:16 +0100 |
|---|---|---|
| committer | Miran Bastaja <miran.bastaja04@gmail.com> | 2023-11-03 15:59:16 +0100 |
| commit | f559671cae7b02526dedf7923b135c09e0d095d5 (patch) | |
| tree | 0f273fb13211c4aa7cae2add41e3aa2b1c6d7785 /share/home/firefox/default.nix | |
Inital commit ;P
Diffstat (limited to 'share/home/firefox/default.nix')
| -rw-r--r-- | share/home/firefox/default.nix | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/share/home/firefox/default.nix b/share/home/firefox/default.nix new file mode 100644 index 0000000..f1ee260 --- /dev/null +++ b/share/home/firefox/default.nix @@ -0,0 +1,62 @@ +{ pkgs, ... }: +let + # Concatenate all files in the `./usercss` directory into one string + css-files = + map (n: ./usercss/${n}) (builtins.attrNames (builtins.readDir ./usercss)); + userChrome = builtins.concatStringsSep "\n" (map builtins.readFile css-files); +in +{ + programs.firefox = { + enable = true; + profiles = { + alice = { + name = "alice"; + isDefault = true; + inherit userChrome; + + search = { + default = "DuckDuckGo"; + engines = { + "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" ]; + }; + + "NixOS Wiki" = { + urls = [{ + template = "https://nixos.wiki/index.php?search={searchTerms}"; + }]; + iconUpdateURL = "https://nixos.wiki/favicon.png"; + updateInterval = 24 * 60 * 60 * 1000; # every day + definedAliases = [ "@nw" ]; + }; + + "Bing".metaData.hidden = true; + # builtin engines only support specifying one additional alias + "Google".medaData.alias = "@g"; + }; + }; # end of search + + settings = { + "browser.compactmode.show" = true; + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + }; + }; # end of alice (profile) + }; # end of profiles + }; +} |
