Split firefox into multiple expressions

Start adding bookmarks back as nix expression, WIP, missing some work
bookmark at the moment
This commit is contained in:
Evie Litherland-Smith 2023-10-02 08:15:37 +01:00
parent 6d56e9c71d
commit dcccfa8216
5 changed files with 236 additions and 120 deletions

View file

@ -3,7 +3,6 @@
{
imports = [
./alacritty.nix
./firefox.nix
./fzf.nix
./git.nix
./media.nix
@ -15,6 +14,7 @@
./hyprland/default.nix
./emacs/default.nix
./accounts/default.nix
./firefox/default.nix
];
home.packages = with pkgs; [ dig silver-searcher gnumake ];
programs = {

View file

@ -1,119 +0,0 @@
{ pkgs, ... }: {
programs.firefox = {
enable = true;
profiles.default = {
settings = {
"app.shield.optoutstudies.enabled" = false;
"browser.bookmarks.addedImportButton" = true;
"browser.bookmarks.showMobileBookmarks" = true;
"browser.toolbars.bookmarks.visibility" = "newtab";
"browser.contentblocking.category" = "strict";
"browser.search.region" = "GB";
"browser.search.isUS" = false;
"browser.warnOnQuitShortcut" = false;
"distribution.searchplugins.defaultLocale" = "en-GB";
"doh-rollout.home-region" = "GB";
"extensions.activeThemeID" = "firefox-alpenglow@mozilla.org";
"extensions.formautofill.creditCards.enabled" = false;
"general.useragent.locale" = "en-GB";
"intl.accept_languages" = "en-gb,en";
"intl.locale.requested" = "en-gb,en";
"intl.regional_prefs.use_os_locales" = false;
"media.eme.enabled" = true;
"privacy.webrtc.legacyGlobalIndicator" = false;
"signon.management.page.breach-alerts.enabled" = false;
"signon.rememberSignons" = false;
"browser.newtabpage.pinned" = [
{
title = "NixOS Wiki";
url = "https://nixos.wiki";
}
{
title = "Arch Wiki";
url = "https://wiki.archlinux.org";
}
{
title = "Hyprland Wiki";
url = "https://wiki.hyprland.org";
}
{
title = "WhatsApp Web";
url = "https://web.whatsapp.com";
}
];
};
search = {
default = "DuckDuckGo";
force = true;
order = [ "DuckDuckGo" ];
engines = {
"OpenStreetMap" = {
urls = [{
template =
"https://www.openstreetmap.org/search?query={searchTerms}";
}];
definedAliases = [ "@om" ];
};
"NixOS Packages" = {
urls = [{
template =
"http://search.nixos.org/packages?channel=unstable&size=50&sort=relevance&type=packages&query={searchTerms}";
}];
icon =
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
"NixOS Options" = {
urls = [{
template =
"http://search.nixos.org/options?channel=unstable&size=50&sort=relevance&type=packages&query={searchTerms}";
}];
icon =
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@no" ];
};
"Home Manager Options" = {
urls = [{
template =
"https://mipmip.github.io/home-manager-option-search/?query={searchTerms}";
}];
icon =
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@hm" ];
};
"PyPI packages" = {
urls = [{ template = "https://pypi.org/search/?q={searchTerms}"; }];
definedAliases = [ "@py" ];
};
"NixOS Wiki" = {
urls = [{
template = "https://nixos.wiki/index.php?search={searchTerms}";
}];
icon =
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@nw" ];
};
"Arch Wiki" = {
urls = [{
template =
"https://wiki.archlinux.org/index.php?search={searchTerms}";
}];
definedAliases = [ "@aw" ];
};
"GitHub" = {
urls =
[{ template = "https://github.com/search?q={searchTerms}"; }];
definedAliases = [ "@gh" ];
};
"MyNixOS" = {
urls =
[{ template = "https://mynixos.com/search?q={searchTerms}"; }];
icon =
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@mn" ];
};
};
};
};
};
}

121
home/firefox/bookmarks.nix Normal file
View file

@ -0,0 +1,121 @@
{ config, lib, pkgs, ... }:
[{
name = "Toolbar";
toolbar = true;
bookmarks = [
{
name = "NixOS Wiki";
tags = [ "wiki" "nix" ];
url = "https://nixos.wiki/";
}
{
name = "Arch Wiki";
tags = [ "wiki" "arch" ];
url = "https://wiki.archlinux.org/";
}
{
name = "Hyprland Wiki";
tags = [ "wiki" "hyprland" "wayland" "wlroots" ];
url = "https://wiki.hyprland.org/";
}
{
name = "Dev";
bookmarks = [
{
name = "Gitea";
tags = [ "git" "source" ];
url = "https://git.xenia.me.uk";
}
{
name = "GitHub";
tags = [ "git" "source" ];
url = "https://github.com";
}
{
name = "GitLab";
tags = [ "git" "source" ];
url = "https://gitlab.com";
}
{
name = "StackOverflow";
url = "https://stackoverflow.com";
}
{
name = "PyPI";
url = "https://pypi.org";
}
];
}
{
name = "Games";
bookmarks = [
{
name = "ProtonDB";
url = "https://www.protondb.com/";
}
{
name = "SteamDB";
url = "https://steamdb.info/";
}
{
name = "Roberts Space Industries";
url = "https://robertsspaceindustries.com/";
}
];
}
{
name = "Work";
bookmarks = [
{
name = "Nucleus";
url = "https://nucleus.ukaea.uk";
}
{
name = "JET";
url = "http://w3.jet.uk";
}
{
name = "Physics Summary";
url =
"https://users.euro-fusion.org/pages/physics-summary/LatestSession.php";
}
{
name = "JSPO";
url =
"https://www.jspo.jet.uk/pages/operations/jpecreports_2023.html";
}
{
name = "Rosters";
bookmarks = [{
name = "J2 Roster";
url =
"https://apps.powerapps.com/play/e/default-c6ac664b-ae27-4d5d-b4e6-bb5717196fc7/a/c403a9ad-95e0-47b7-8c82-752b22a6d6f5?tenantId=c6ac664b-ae27-4d5d-b4e6-bb5717196fc7&source=portal";
}];
}
{
name = "OpenWiki";
bookmarks = [
{
name = "Main Page";
url = "https://wiki.jetdata.eu/open/index.php?title=Main_Page";
}
{
name = "KS5";
url = "https://wiki.jetdata.eu/open/index.php?title=CXS:Topic3";
}
{
name = "KT3";
url = "https://wiki.jetdata.eu/open/index.php?title=KT3_Journals";
}
];
}
{
name = "Mimics";
bookmarks = [ ];
}
];
}
];
}]

50
home/firefox/default.nix Normal file
View file

@ -0,0 +1,50 @@
{ config, lib, pkgs, ... }: {
programs.firefox = {
enable = true;
profiles.default = {
settings = {
"app.shield.optoutstudies.enabled" = false;
"browser.bookmarks.addedImportButton" = false;
"browser.bookmarks.showMobileBookmarks" = false;
"browser.toolbars.bookmarks.visibility" = "always";
"browser.contentblocking.category" = "strict";
"browser.search.region" = "GB";
"browser.search.isUS" = false;
"browser.warnOnQuitShortcut" = false;
"distribution.searchplugins.defaultLocale" = "en-GB";
"doh-rollout.home-region" = "GB";
"extensions.activeThemeID" = "firefox-alpenglow@mozilla.org";
"extensions.formautofill.creditCards.enabled" = false;
"general.useragent.locale" = "en-GB";
"intl.accept_languages" = "en-gb,en";
"intl.locale.requested" = "en-gb,en";
"intl.regional_prefs.use_os_locales" = false;
"media.eme.enabled" = true;
"privacy.webrtc.legacyGlobalIndicator" = false;
"signon.management.page.breach-alerts.enabled" = false;
"signon.rememberSignons" = false;
"browser.newtabpage.pinned" = [
{
title = "NixOS Wiki";
url = "https://nixos.wiki";
}
{
title = "Arch Wiki";
url = "https://wiki.archlinux.org";
}
{
title = "Hyprland Wiki";
url = "https://wiki.hyprland.org";
}
];
};
search = {
default = "DuckDuckGo";
force = true;
order = [ "DuckDuckGo" ];
engines = import ./search.nix { inherit config lib pkgs; };
};
bookmarks = import ./bookmarks.nix { inherit config lib pkgs; };
};
};
}

64
home/firefox/search.nix Normal file
View file

@ -0,0 +1,64 @@
{ config, lib, pkgs, ... }:
{
"OpenStreetMap" = {
urls = [{
template = "https://www.openstreetmap.org/search?query={searchTerms}";
}];
definedAliases = [ "@om" ];
};
"NixOS Packages" = {
urls = [{
template =
"http://search.nixos.org/packages?channel=unstable&size=50&sort=relevance&type=packages&query={searchTerms}";
}];
icon =
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
"NixOS Options" = {
urls = [{
template =
"http://search.nixos.org/options?channel=unstable&size=50&sort=relevance&type=packages&query={searchTerms}";
}];
icon =
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@no" ];
};
"Home Manager Options" = {
urls = [{
template =
"https://mipmip.github.io/home-manager-option-search/?query={searchTerms}";
}];
icon =
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@hm" ];
};
"PyPI packages" = {
urls = [{ template = "https://pypi.org/search/?q={searchTerms}"; }];
definedAliases = [ "@py" ];
};
"NixOS Wiki" = {
urls =
[{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }];
icon =
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@nw" ];
};
"Arch Wiki" = {
urls = [{
template = "https://wiki.archlinux.org/index.php?search={searchTerms}";
}];
definedAliases = [ "@aw" ];
};
"GitHub" = {
urls = [{ template = "https://github.com/search?q={searchTerms}"; }];
definedAliases = [ "@gh" ];
};
"MyNixOS" = {
urls = [{ template = "https://mynixos.com/search?q={searchTerms}"; }];
icon =
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@mn" ];
};
}