Move firefox config up to system level

Enables automatic installation of firefox plugins
Enable working passff integration
This commit is contained in:
Evie Litherland-Smith 2023-10-06 13:56:11 +01:00
parent 8a928bea4c
commit f2eadee91e
9 changed files with 256 additions and 242 deletions

View file

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

View file

@ -1,6 +1,7 @@
{ config, lib, pkgs, ... }: {
programs.firefox = {
enable = true;
package = null; # Use system Firefox
profiles.default = {
settings = {
"app.shield.optoutstudies.enabled" = false;
@ -13,7 +14,7 @@
"browser.warnOnQuitShortcut" = false;
"distribution.searchplugins.defaultLocale" = "en-GB";
"doh-rollout.home-region" = "GB";
"extensions.activeThemeID" = "firefox-alpenglow@mozilla.org";
"extensions.activeThemeID" = "default-theme@mozilla.org";
"extensions.formautofill.creditCards.enabled" = false;
"general.useragent.locale" = "en-GB";
"intl.accept_languages" = "en-gb,en";
@ -42,9 +43,16 @@
default = "DuckDuckGo";
force = true;
order = [ "DuckDuckGo" ];
engines = import ./search.nix { inherit config lib pkgs; };
engines = {
"MyNixOS" = {
urls =
[{ template = "https://mynixos.com/search?q={searchTerms}"; }];
icon =
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@mn" ];
};
};
};
bookmarks = import ./bookmarks.nix { inherit config lib pkgs; };
};
};
}

View file

@ -1,158 +0,0 @@
{ config, lib, pkgs, ... }:
[{
name = "Toolbar";
toolbar = true;
bookmarks = [
{
name = "Config Repo";
tags = [ "nix" "git" "config" ];
url = "https://git.xenia.me.uk/xenia/nixos";
}
{
name = "NixOS Wiki";
tags = [ "wiki" "nix" ];
url = "https://nixos.wiki/";
}
{
name = "Hyprland Wiki";
tags = [ "wiki" "hyprland" "wayland" "wlroots" ];
url = "https://wiki.hyprland.org/";
}
{
name = "Arch Wiki";
tags = [ "wiki" "arch" ];
url = "https://wiki.archlinux.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 = "Marval";
url = "https://marval.service.ukaea.uk/MSMSelfService/Index.aspx";
}
{
name = "U4BW";
url = "https://ubw.unit4cloud.com/uk_aea_prod_web/Login/Login.aspx";
}
{
name = "Office365";
url = "https://www.office.com";
}
{
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 = "KS5";
url =
"https://wiki.jetdata.eu/open/index.php?title=Ks5:roster3008";
}
];
}
{
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 = [
{
name = "Countdown";
url = "http://webmimic.jet.uk/mc/codas/countdown";
}
{
name = "KS5";
url = "http://webmimic.jet.uk/DG/codas/ks5.mim.html";
}
{
name = "KT3";
url = "http://webmimic.jet.uk/DG/codas/kt3spec.mim.html";
}
];
}
];
}
];
}]

View file

@ -1,68 +0,0 @@
{ 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" ];
};
"StackOverflow" = {
urls = [{ template = "https://stackoverflow.com/search?q={searchTerms}"; }];
definedAliases = [ "@so" ];
};
"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" ];
};
}

View file

@ -16,9 +16,7 @@
zotero
minesweep-rs
];
programs = {
firefox.package = pkgs.firefox-wayland;
rofi = {
programs.rofi = {
package = pkgs.rofi-wayland;
terminal = "${pkgs.alacritty}/bin/alacritty";
pass.extraConfig = ''
@ -26,7 +24,6 @@
clibpoard_backend=wl-clipboard
'';
};
};
services.kanshi = {
enable = true;
systemdTarget = "hyprland-session.target";

View file

@ -21,8 +21,6 @@
pinentryFlavor = "gtk2";
extraConfig = ''
no-allow-external-cache
allow-emacs-pinentry
allow-loopback-pinentry
'';
};
password-store-sync.enable = true;

View file

@ -1,6 +1,7 @@
{ pkgs, ... }:
{
imports = [ ./firefox.nix ];
environment.systemPackages = with pkgs;
with libsForQt5.qt5; [
dex

235
system/firefox.nix Normal file
View file

@ -0,0 +1,235 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [ passff-host ];
programs.firefox = {
enable = true;
nativeMessagingHosts.passff = true;
languagePacks = [ "en-GB" ];
policies = {
Cookies = { Behaviour = "reject-tracker-and-partition-foreign"; };
DisableAppUpdate = true;
DisableBuiltinPDFViewer = true;
DisableFirefoxAccounts = true;
DisableFirefoxStudies = true;
DisableProfileImport = true;
DisableSetDesktopBackground = true;
DisableSystemAddonUpdate = true;
DisableTelemetry = true;
DisplayBookmarksToolbar = "always";
DisplayMenuBar = "default-off";
EnableTrackingProtection = {
Value = true;
Cryptomining = true;
Fingerprinting = true;
EmailTracking = true;
};
ExtensionSettings = {
"uBlock0@raymondhill.net" = {
installation_mode = "force_installed";
install_url =
"https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
};
"queryamoid@kaply.com" = {
installation_mode = "force_installed";
install_url =
"https://github.com/mkaply/queryamoid/releases/download/v0.1/query_amo_addon_id-0.1-fx.xpi";
};
"addon@simplelogin" = {
installation_mode = "normal_installed";
install_url =
"https://addons.mozilla.org/firefox/downloads/latest/simplelogin/latest.xpi";
};
"floccus@handmadeideas.org" = {
installation_mode = "normal_installed";
install_url =
"https://addons.mozilla.org/firefox/downloads/latest/floccus/latest.xpi";
};
"passff@invicem.pro" = {
installation_mode = "normal_installed";
install_url =
"https://addons.mozilla.org/firefox/downloads/latest/passff/latest.xpi";
};
};
FirefoxHome = {
Search = true;
TopSites = true;
SponsoredTopSites = false;
Highlights = false;
Pocket = false;
SponsoredPocket = false;
Snippets = false;
Locked = true;
};
HomePage = {
URL = "https://nixos.org";
StartPage = "homepage-locked";
};
ManagedBookmarks = [
{ toplevel_name = "Standard Bookmarks"; }
{
name = "Config Repo";
url = "https://git.xenia.me.uk/xenia/nixos";
}
{
name = "NixOS Wiki";
url = "https://nixos.wiki/";
}
{
name = "Hyprland Wiki";
url = "https://wiki.hyprland.org/";
}
{
name = "Arch Wiki";
url = "https://wiki.archlinux.org/";
}
{
name = "Mozilla Policy Templates";
url = "https://mozilla.github.io/policy-templates/";
}
{
name = "Dev";
children = [
{
name = "Gitea";
url = "https://git.xenia.me.uk";
}
{
name = "GitHub";
url = "https://github.com";
}
{
name = "GitLab";
url = "https://gitlab.com";
}
{
name = "StackOverflow";
url = "https://stackoverflow.com";
}
{
name = "PyPI";
url = "https://pypi.org";
}
];
}
{
name = "Games";
children = [
{
name = "ProtonDB";
url = "https://www.protondb.com/";
}
{
name = "SteamDB";
url = "https://steamdb.info/";
}
{
name = "Roberts Space Industries";
url = "https://robertsspaceindustries.com/";
}
];
}
{
name = "Work";
children = [
{
name = "Nucleus";
url = "https://nucleus.ukaea.uk";
}
{
name = "JET";
url = "http://w3.jet.uk";
}
{
name = "Marval";
url = "https://marval.service.ukaea.uk/MSMSelfService/Index.aspx";
}
{
name = "U4BW";
url =
"https://ubw.unit4cloud.com/uk_aea_prod_web/Login/Login.aspx";
}
{
name = "Office365";
url = "https://www.office.com";
}
{
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 = "pySpec";
url = "http://heimdall003.jet.uk:3060/v1/interactive";
}
{
name = "Rosters";
children = [
{
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 = "KS5";
url =
"https://wiki.jetdata.eu/open/index.php?title=Ks5:roster3008";
}
];
}
{
name = "OpenWiki";
children = [
{
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";
children = [
{
name = "Countdown";
url = "http://webmimic.jet.uk/mc/codas/countdown";
}
{
name = "KS5";
url = "http://webmimic.jet.uk/DG/codas/ks5.mim.html";
}
{
name = "KT3";
url = "http://webmimic.jet.uk/DG/codas/kt3spec.mim.html";
}
];
}
];
}
];
NoDefaultBookmarks = true;
OfferToSaveLogins = false;
PasswordManagerEnabled = false;
PopupBlocking = { Default = true; };
RequestedLocales = [ "en-GB" ];
SearchEngines = { Default = "DuckDuckGo"; };
ShowHomeButton = true;
StartDownloadsInTempDirectory = true;
};
};
}

View file

@ -74,5 +74,6 @@
enable = true;
plugins = with pkgs.xfce; [ thunar-archive-plugin thunar-volman ];
};
firefox.package = pkgs.firefox-wayland;
};
}