2023-06-09 13:17:34 +02:00
|
|
|
{ config, pkgs, inputs, ... }:
|
2023-05-18 01:56:19 +02:00
|
|
|
let
|
|
|
|
# {{{ Global extensions
|
|
|
|
extensions = with inputs.firefox-addons.packages.${pkgs.system}; [
|
|
|
|
buster-captcha-solver
|
|
|
|
bypass-paywalls-clean
|
|
|
|
clearurls # removes ugly args from urls
|
|
|
|
don-t-fuck-with-paste # disallows certain websites from disabling pasting
|
|
|
|
gesturefy # mouse gestures
|
|
|
|
i-dont-care-about-cookies
|
|
|
|
localcdn # caches libraries locally
|
|
|
|
privacy-badger # blocks some trackers
|
|
|
|
privacy-pass # captcha stuff
|
|
|
|
skip-redirect # attempts to skip to the final reddirect for certain urls
|
|
|
|
terms-of-service-didnt-read
|
|
|
|
translate-web-pages
|
|
|
|
ublock-origin
|
|
|
|
unpaywall
|
|
|
|
user-agent-string-switcher
|
|
|
|
];
|
|
|
|
# }}}
|
|
|
|
in
|
2023-01-12 20:49:08 +01:00
|
|
|
{
|
|
|
|
programs.firefox = {
|
|
|
|
enable = true;
|
2023-05-18 01:56:19 +02:00
|
|
|
|
2023-01-12 20:49:08 +01:00
|
|
|
profiles.adrielus = {
|
2023-04-27 01:08:20 +02:00
|
|
|
# {{{ High level user settings
|
2023-01-12 20:49:08 +01:00
|
|
|
# Unique user id
|
|
|
|
id = 0;
|
|
|
|
|
|
|
|
# Make this the default user
|
|
|
|
isDefault = true;
|
|
|
|
|
2023-04-27 01:08:20 +02:00
|
|
|
# Forcefully replace the search configuration
|
2023-01-12 20:49:08 +01:00
|
|
|
search.force = true;
|
|
|
|
|
|
|
|
# Set default search engine
|
|
|
|
search.default = "Google";
|
2023-05-03 18:08:02 +02:00
|
|
|
|
|
|
|
# Set styles applied to every website
|
|
|
|
userContent = builtins.readFile ./userContent.css;
|
2023-04-27 01:08:20 +02:00
|
|
|
# }}}
|
|
|
|
# {{{ Extensions
|
2023-05-18 01:56:19 +02:00
|
|
|
extensions = with inputs.firefox-addons.packages.${pkgs.system}; extensions ++ [
|
2023-03-07 15:19:18 +01:00
|
|
|
firenvim # summon a nvim instance inside the browser
|
|
|
|
lovely-forks # displays forks on github
|
|
|
|
octolinker # github import to link thingy
|
|
|
|
octotree # github file tree
|
2023-03-14 20:57:07 +01:00
|
|
|
refined-github # a bunch of github modifications
|
2023-03-07 15:19:18 +01:00
|
|
|
return-youtube-dislikes
|
2023-03-14 20:57:07 +01:00
|
|
|
steam-database # adds info from steamdb on storepages
|
2023-03-07 15:19:18 +01:00
|
|
|
sponsorblock # skip youtube sponsors
|
2023-03-14 20:57:07 +01:00
|
|
|
vimium-c # vim keybinds
|
|
|
|
youtube-shorts-block
|
2023-03-07 15:19:18 +01:00
|
|
|
];
|
2023-04-27 01:08:20 +02:00
|
|
|
# }}}
|
|
|
|
# {{{ Search engines
|
|
|
|
search.engines =
|
|
|
|
let
|
|
|
|
# {{{ Search engine creation helpers
|
|
|
|
mkBasicSearchEngine = { aliases, url, param }: {
|
|
|
|
urls = [{
|
|
|
|
template = url;
|
|
|
|
params = [
|
|
|
|
{ name = param; value = "{searchTerms}"; }
|
|
|
|
];
|
|
|
|
}];
|
|
|
|
|
|
|
|
definedAliases = aliases;
|
|
|
|
};
|
|
|
|
|
|
|
|
mkNixPackagesEngine = { aliases, type }:
|
|
|
|
let basicEngine = mkBasicSearchEngine
|
|
|
|
{
|
|
|
|
aliases = aliases;
|
|
|
|
url = "https://search.nixos.org/${type}";
|
|
|
|
param = "query";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
basicEngine // {
|
|
|
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
|
|
|
};
|
|
|
|
# }}}
|
|
|
|
in
|
|
|
|
# {{{ Engine declarations
|
|
|
|
{
|
|
|
|
"Nix Packages" = mkNixPackagesEngine {
|
|
|
|
aliases = [ "@np" "@nix-packages" ];
|
|
|
|
type = "packages";
|
|
|
|
};
|
|
|
|
|
|
|
|
"Nix options" = mkNixPackagesEngine {
|
|
|
|
aliases = [ "@no" "@nix-options" ];
|
|
|
|
type = "options";
|
|
|
|
};
|
|
|
|
|
|
|
|
"Pursuit" = mkBasicSearchEngine {
|
|
|
|
url = "https://pursuit.purescript.org/search";
|
|
|
|
param = "q";
|
|
|
|
aliases = [ "@ps" "@pursuit" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
"Wikipedia" = mkBasicSearchEngine {
|
|
|
|
url = "https://en.wikipedia.org/wiki/Special:Search";
|
|
|
|
param = "search";
|
|
|
|
aliases = [ "@wk" "@wikipedia" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
"Github" = mkBasicSearchEngine {
|
|
|
|
url = "https://github.com/search";
|
|
|
|
param = "q";
|
|
|
|
aliases = [ "@gh" "@github" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
"Youtube" = mkBasicSearchEngine {
|
|
|
|
url = "https://www.youtube.com/results";
|
|
|
|
param = "search_query";
|
|
|
|
aliases = [ "@yt" "@youtube" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
"Noita wiki" = mkBasicSearchEngine {
|
|
|
|
url = "https://noita.wiki.gg/index.php";
|
|
|
|
param = "search";
|
|
|
|
aliases = [ "@noita" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
"Rain world wiki" = mkBasicSearchEngine {
|
|
|
|
url = "https://rainworld.miraheze.org/w/index.php";
|
|
|
|
param = "search";
|
|
|
|
aliases = [ "@rw" "@rain-world" ];
|
|
|
|
};
|
|
|
|
|
2023-06-18 18:10:20 +02:00
|
|
|
"Arch wiki" = mkBasicSearchEngine {
|
|
|
|
url = "https://wiki.archlinux.org/index.php";
|
|
|
|
param = "search";
|
|
|
|
aliases = [ "@aw" "@arch-wiki" ];
|
|
|
|
};
|
|
|
|
|
2023-04-27 01:08:20 +02:00
|
|
|
"Factorio wiki" = mkBasicSearchEngine {
|
|
|
|
url = "https://wiki.factorio.com/index.php";
|
|
|
|
param = "search";
|
|
|
|
aliases = [ "@fw" "@factorio-wiki" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
"Factorio mod portal" = mkBasicSearchEngine {
|
|
|
|
url = "https://mods.factorio.com/";
|
|
|
|
param = "query";
|
|
|
|
aliases = [ "@fm" "@factorio-mods" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
"Google".metaData.alias = "@g";
|
2023-01-12 20:49:08 +01:00
|
|
|
};
|
2023-04-27 01:08:20 +02:00
|
|
|
# }}}
|
|
|
|
# }}}
|
|
|
|
# {{{ Other lower level settings
|
2023-03-16 17:39:46 +01:00
|
|
|
settings = {
|
|
|
|
# Required for figma to be able to export to svg
|
|
|
|
"dom.events.asyncClipboard.clipboardItem" = true;
|
2023-05-03 18:08:02 +02:00
|
|
|
|
|
|
|
# Customize css
|
|
|
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
|
|
|
|
|
|
|
# Set language to english
|
|
|
|
"general.useragent.locale" = "en-GB";
|
2023-05-24 03:17:09 +02:00
|
|
|
|
|
|
|
# Do not restore sessions after what looks like a "crash"
|
|
|
|
"browser.sessionstore.resume_from_crash" = false;
|
|
|
|
|
|
|
|
# Tell firefox to make multiple requests at once
|
|
|
|
# See [this random page](https://doorsanchar.com/how-to-make-mozilla-firefox-30-times-faster/)
|
|
|
|
# "network.http.pipelining" = true;
|
|
|
|
# "network.http.proxy.pipelining" = true;
|
|
|
|
# "network.http.pipelining.maxrequests" = 30; # Allow 30 requests at once
|
|
|
|
# "nglayout.initialpaint.delay" = 0;
|
2023-03-16 17:39:46 +01:00
|
|
|
};
|
2023-04-27 01:08:20 +02:00
|
|
|
# }}}
|
2023-01-12 20:49:08 +01:00
|
|
|
};
|
2023-01-15 23:04:11 +01:00
|
|
|
|
2023-04-27 01:08:20 +02:00
|
|
|
# {{{ Standalone "apps" which actually run inside a browser.
|
2023-05-18 01:56:19 +02:00
|
|
|
apps.extensions = extensions;
|
|
|
|
apps.app = {
|
2023-03-12 05:24:25 +01:00
|
|
|
# {{{ Job stuff
|
2023-07-07 21:25:05 +02:00
|
|
|
# {{{ Asana
|
2023-03-12 05:24:25 +01:00
|
|
|
asana = {
|
|
|
|
url = "https://app.asana.com/";
|
|
|
|
icon = ./icons/asana.png;
|
|
|
|
displayName = "Asana";
|
|
|
|
id = 1;
|
|
|
|
};
|
2023-07-07 21:25:05 +02:00
|
|
|
# }}}
|
|
|
|
# {{{ Clockodo
|
2023-03-12 05:24:25 +01:00
|
|
|
clockodo = {
|
|
|
|
url = "https://my.clockodo.com/en/";
|
|
|
|
icon = ./icons/clockodo.png;
|
|
|
|
displayName = "Clockodo";
|
|
|
|
id = 2;
|
|
|
|
};
|
|
|
|
# }}}
|
2023-07-07 21:25:05 +02:00
|
|
|
# }}}
|
|
|
|
# {{{ Gitlab
|
2023-03-12 05:24:25 +01:00
|
|
|
gitlab = {
|
|
|
|
url = "https://gitlab.com";
|
|
|
|
icon = ./icons/gitlab.png;
|
|
|
|
displayName = "Gitlab";
|
|
|
|
id = 3;
|
|
|
|
};
|
2023-07-07 21:25:05 +02:00
|
|
|
# }}}
|
|
|
|
# {{{ Desmos
|
2023-03-20 20:02:01 +01:00
|
|
|
desmos = {
|
|
|
|
url = "https://www.desmos.com/calculator";
|
|
|
|
icon = ./icons/desmos.png;
|
|
|
|
displayName = "Desmos";
|
|
|
|
id = 4;
|
|
|
|
};
|
2023-07-07 21:25:05 +02:00
|
|
|
# }}}
|
|
|
|
# {{{ Monkey type
|
2023-05-18 01:56:19 +02:00
|
|
|
monkey-type = {
|
|
|
|
url = "https://monkeytype.com/";
|
|
|
|
icon = ./icons/monkeytype.png;
|
|
|
|
displayName = "Monkeytype";
|
|
|
|
id = 5;
|
|
|
|
};
|
2023-07-07 21:25:05 +02:00
|
|
|
# }}}
|
|
|
|
# {{{ Syncthing
|
|
|
|
syncthing = {
|
|
|
|
url = "http://localhost:8384/";
|
|
|
|
icon = ./icons/syncthing.png;
|
|
|
|
displayName = "Syncthing";
|
|
|
|
id = 6;
|
|
|
|
};
|
|
|
|
# }}}
|
2023-03-12 05:24:25 +01:00
|
|
|
};
|
2023-04-27 01:08:20 +02:00
|
|
|
# }}}
|
2023-03-12 05:24:25 +01:00
|
|
|
};
|
2023-04-27 01:08:20 +02:00
|
|
|
|
|
|
|
# {{{ Make firefox the default
|
|
|
|
# Use firefox as the default browser to open stuff.
|
2023-04-27 15:36:14 +02:00
|
|
|
xdg.mimeApps.defaultApplications = {
|
|
|
|
"text/html" = [ "firefox.desktop" ];
|
|
|
|
"text/xml" = [ "firefox.desktop" ];
|
|
|
|
"x-scheme-handler/http" = [ "firefox.desktop" ];
|
|
|
|
"x-scheme-handler/https" = [ "firefox.desktop" ];
|
|
|
|
};
|
2023-04-27 01:08:20 +02:00
|
|
|
|
|
|
|
# Tell apps firefox is the default browser using an env var.
|
|
|
|
home.sessionVariables.BROWSER = "firefox";
|
|
|
|
# }}}
|
|
|
|
# {{{ Persistence
|
2023-06-09 13:17:34 +02:00
|
|
|
satellite.persistence.at.state.apps.Firefox.directories = [
|
2023-04-27 01:08:20 +02:00
|
|
|
".mozilla/firefox" # More important stuff
|
|
|
|
];
|
2023-06-09 13:17:34 +02:00
|
|
|
|
|
|
|
satellite.persistence.at.cache.apps.Firefox.directories = [
|
|
|
|
"${config.xdg.cacheHome}/mozilla/firefox" # Non important cache
|
|
|
|
];
|
2023-04-27 01:08:20 +02:00
|
|
|
# }}}
|
2023-01-12 20:49:08 +01:00
|
|
|
}
|
2023-05-24 03:17:09 +02:00
|
|
|
|