385 lines
13 KiB
Nix
385 lines
13 KiB
Nix
{ nixosConfig, pkgs, ... }:
|
|
{
|
|
programs.firefox = {
|
|
inherit (nixosConfig.jalr.gui) enable;
|
|
package = pkgs.firefox-esr.override {
|
|
nativeMessagingHosts = [
|
|
pkgs.browserpass
|
|
];
|
|
};
|
|
policies = {
|
|
AllowedDomainsForApps = "";
|
|
CaptivePortal = false;
|
|
DNSOverHTTPS.Enabled = false;
|
|
DisableAppUpdate = true;
|
|
DisableFeedbackCommands = true;
|
|
DisableFirefoxAccounts = true;
|
|
DisableFirefoxScreenshots = true;
|
|
DisableFirefoxStudies = true;
|
|
DisablePocket = true;
|
|
DisableTelemetry = true;
|
|
DisplayBookmarksToolbar = "newtab";
|
|
DisplayMenuBar = "never";
|
|
EncryptedMediaExtensions = { Enabled = false; Locked = true; };
|
|
NoDefaultBookmarks = true;
|
|
OfferToSaveLogins = false;
|
|
StartDownloadsInTempDirectory = true;
|
|
UserMessaging = {
|
|
WhatsNew = false;
|
|
ExtensionRecommendations = false;
|
|
FeatureRecommendations = false;
|
|
UrlbarInterventions = false;
|
|
SkipOnboarding = true;
|
|
MoreFromMozilla = false;
|
|
Locked = false;
|
|
};
|
|
Permissions = {
|
|
Camera = {
|
|
/*
|
|
Allow = ["https://example.org" "https://example.org:1234"];
|
|
Block = ["https://example.edu"];
|
|
BlockNewRequests = true | false;
|
|
Locked = true | false;
|
|
*/
|
|
};
|
|
Microphone = { };
|
|
Location = { };
|
|
Notifications = { };
|
|
Autoplay = { };
|
|
};
|
|
PopupBlocking = {
|
|
/* Allow = ["http://example.org/" "http://example.edu/"]; */
|
|
Default = false;
|
|
Locked = false;
|
|
};
|
|
Bookmarks = (
|
|
builtins.map
|
|
(b: b // {
|
|
Folder = "Nix";
|
|
Placement = "toolbar";
|
|
}) [
|
|
{
|
|
Title = "NixOS Manual";
|
|
URL = "https://nixos.org/manual/nixos/stable/";
|
|
}
|
|
{
|
|
Title = "Nix manual";
|
|
URL = "https://nix.dev/manual/nix/2.18/stable";
|
|
}
|
|
{
|
|
Title = "Nixpkgs manual";
|
|
URL = "https://nixos.org/manual/nixpkgs/stable/";
|
|
}
|
|
{
|
|
Title = "Noogle";
|
|
URL = "https://noogle.dev/";
|
|
}
|
|
{
|
|
Title = "Home Manager Configuration Options";
|
|
URL = "https://nix-community.github.io/home-manager/options.xhtml";
|
|
}
|
|
{
|
|
Title = "Home Manager Option Search";
|
|
URL = "https://mipmip.github.io/home-manager-option-search/";
|
|
}
|
|
{
|
|
Title = "NixOS Status";
|
|
URL = "https://status.nixos.org/";
|
|
}
|
|
{
|
|
Title = "krops";
|
|
URL = "https://cgit.krebsco.de/krops/about/";
|
|
}
|
|
{
|
|
Title = "Awesome Nix";
|
|
URL = "https://github.com/nix-community/awesome-nix";
|
|
}
|
|
]
|
|
) ++ (
|
|
builtins.map
|
|
(b: b // {
|
|
Folder = "Digitaler Dienst";
|
|
Placement = "toolbar";
|
|
}) [
|
|
{
|
|
Title = "GitLab";
|
|
URL = "https://gitlab.digitaler-dienst.net/";
|
|
}
|
|
{
|
|
Title = "Moco";
|
|
URL = "https://digitaler-dienst.mocoapp.com/activities";
|
|
}
|
|
{
|
|
Title = "Leantime";
|
|
URL = "https://todo.digitaler-dienst.gmbh/";
|
|
}
|
|
{
|
|
Title = "Nextcloud";
|
|
URL = "https://nx52865.your-storageshare.de/";
|
|
}
|
|
{
|
|
Title = "FreeScout";
|
|
URL = "https://tickets.digitaler-dienst.gmbh/";
|
|
}
|
|
{
|
|
Title = "Personio";
|
|
URL = "https://laemmermann.personio.de/";
|
|
}
|
|
]
|
|
) ++ [
|
|
{
|
|
Title = "Fefes Blog";
|
|
URL = "https://blog.fefe.de";
|
|
Placement = "toolbar";
|
|
#Placement = "menu";
|
|
#Favicon = "https://example.com/favicon.ico";
|
|
}
|
|
];
|
|
/*
|
|
ManagedBookmarks = [
|
|
{
|
|
toplevel_name = "My managed bookmarks folder";
|
|
}
|
|
{
|
|
url = "example.com";
|
|
name = "Example";
|
|
}
|
|
{
|
|
name = "Mozilla links";
|
|
children = [
|
|
{
|
|
url = "https://mozilla.org";
|
|
name = "Mozilla.org";
|
|
}
|
|
{
|
|
url = "https://support.mozilla.org/";
|
|
name = "SUMO";
|
|
}
|
|
];
|
|
}
|
|
];
|
|
*/
|
|
SearchEngines = {
|
|
Default = "DuckDuckGo";
|
|
Remove = [
|
|
"Google"
|
|
"Wikipedia (en)"
|
|
];
|
|
Add = [
|
|
{
|
|
Name = "Startpage";
|
|
URLTemplate = "https://www.startpage.com/sp/search";
|
|
Method = "POST";
|
|
PostData = "qadf=none&query={searchTerms}";
|
|
IconURL = "https://www.startpage.com/sp/cdn/favicons/mobile/android-icon-192x192.png";
|
|
Alias = "sp";
|
|
}
|
|
{
|
|
Name = "DuckDuckGo";
|
|
URLTemplate = "https://duckduckgo.com/?q={searchTerms}";
|
|
Method = "GET";
|
|
IconURL = "https://duckduckgo.com/favicon.ico";
|
|
Alias = "ddg";
|
|
}
|
|
|
|
# Wikipedia
|
|
{
|
|
Name = "Wikipedia en";
|
|
URLTemplate = "https://en.wikipedia.org/wiki/Special:Search?search={searchTerms}";
|
|
Method = "GET";
|
|
IconURL = "https://en.wikipedia.org/static/images/icons/wikipedia.png";
|
|
Alias = "wen";
|
|
}
|
|
{
|
|
Name = "Wikipedia de";
|
|
URLTemplate = "https://de.wikipedia.org/w/index.php?search={searchTerms}";
|
|
Method = "GET";
|
|
IconURL = "https://www.wikipedia.de/img/wikipedia.png";
|
|
Alias = "wde";
|
|
}
|
|
{
|
|
Name = "Nix Packages";
|
|
URLTemplate = "https://search.nixos.org/packages?query={searchTerms}";
|
|
Method = "GET";
|
|
IconURL = "https://nixos.org/favicon.png";
|
|
Alias = "pkg";
|
|
}
|
|
{
|
|
Name = "NixOS Options";
|
|
URLTemplate = "https://search.nixos.org/options?query={searchTerms}";
|
|
Method = "GET";
|
|
IconURL = "https://nixos.org/favicon.png";
|
|
Alias = "opt";
|
|
}
|
|
{
|
|
Name = "Docker images";
|
|
URLTemplate = "https://hub.docker.com/search/?q={searchTerms}";
|
|
Method = "GET";
|
|
IconURL = "https://hub.docker.com/favicon.ico";
|
|
Alias = "docker";
|
|
}
|
|
{
|
|
Name = "GitHub";
|
|
URLTemplate = "https://github.com/search?q={searchTerms}";
|
|
Method = "GET";
|
|
IconURL = "https://github.githubassets.com/favicons/favicon.svg";
|
|
Alias = "gh";
|
|
}
|
|
|
|
# Shopping
|
|
{
|
|
Name = "Amazon de";
|
|
URLTemplate = "https://www.amazon.de/s?k={searchTerms}";
|
|
Method = "GET";
|
|
IconURL = "https://www.amazon.de/favicon.ico";
|
|
Alias = "amde";
|
|
}
|
|
{
|
|
Name = "Ebay de";
|
|
URLTemplate = "https://www.ebay.de/sch/i.html?_nkw={searchTerms}";
|
|
Method = "GET";
|
|
IconURL = "https://pages.ebay.com/favicon.ico";
|
|
Alias = "ebde";
|
|
}
|
|
|
|
# Dictionary
|
|
{
|
|
Name = "dict.cc";
|
|
URLTemplate = "https://www.dict.cc/?s={searchTerms}";
|
|
Method = "GET";
|
|
IconURL = "https://www4.dict.cc/img/favicons/favicon4.png";
|
|
Alias = "dcc";
|
|
}
|
|
{
|
|
Name = "Duden";
|
|
URLTemplate = "https://www.duden.de/suchen/dudenonline/{searchTerms}";
|
|
Method = "GET";
|
|
IconURL = "https://www.duden.de/sites/default/res/apple-touch-icon/180x180.png";
|
|
Alias = "duden";
|
|
}
|
|
|
|
# Map
|
|
{
|
|
Name = "OpenStreetMap";
|
|
URLTemplate = "https://www.openstreetmap.org/search?query={searchTerms}";
|
|
Method = "GET";
|
|
IconURL = "https://www.openstreetmap.org/assets/favicon-194x194-79d3fb0152c735866e64b1d7535d504483cd13c2fad0131a6142bd9629d30de2.png";
|
|
Alias = "osm";
|
|
}
|
|
];
|
|
};
|
|
};
|
|
profiles.default = {
|
|
id = 0;
|
|
isDefault = true;
|
|
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
|
browserpass
|
|
darkreader
|
|
sponsorblock
|
|
(tree-style-tab.override {
|
|
version = "4.1.11";
|
|
url = "https://addons.mozilla.org/firefox/downloads/file/4502732/tree_style_tab-4.1.11.xpi";
|
|
sha256 = "sha256-6TFKdnO8I5vls6b75Ig633ffabXIAbiVQa9QuPADfvU=";
|
|
})
|
|
ublock-origin
|
|
umatrix
|
|
violentmonkey
|
|
xdebug-helper-for-firefox
|
|
youtube-shorts-block
|
|
];
|
|
settings = {
|
|
#"browser.startup.homepage" = "https://nixos.org";
|
|
#"browser.search.region" = "GB";
|
|
#"browser.search.isUS" = false;
|
|
#"distribution.searchplugins.defaultLocale" = "en-GB";
|
|
#"general.useragent.locale" = "en-GB";
|
|
#"browser.bookmarks.showMobileBookmarks" = true;
|
|
"app.normandy.enabled" = false;
|
|
"app.shield.optoutstudies.enabled" = false;
|
|
"app.update.auto" = false;
|
|
"browser.bookmarks.addedImportButton" = false;
|
|
"browser.ctrlTab.sortByRecentlyUsed" = true;
|
|
"browser.fixup.alternate.enabled" = false;
|
|
"browser.formfill.enable" = false;
|
|
"browser.link.open_newwindow.restriction" = 0;
|
|
"browser.newtabpage.enabled" = false;
|
|
"browser.ping-centre.telemetry" = false;
|
|
"browser.safebrowsing.downloads.enabled" = false;
|
|
"browser.safebrowsing.downloads.remote.block_dangerous" = false;
|
|
"browser.safebrowsing.downloads.remote.block_dangerous_host" = false;
|
|
"browser.safebrowsing.downloads.remote.block_potentially_unwanted" = false;
|
|
"browser.safebrowsing.downloads.remote.block_uncommon" = false;
|
|
"browser.safebrowsing.downloads.remote.enabled" = false;
|
|
"browser.safebrowsing.downloads.remote.url" = "";
|
|
"browser.safebrowsing.malware.enabled" = false;
|
|
"browser.safebrowsing.phishing.enabled" = false;
|
|
"browser.safebrowsing.provider.google.advisoryURL" = "";
|
|
"browser.safebrowsing.provider.google.gethashURL" = "";
|
|
"browser.safebrowsing.provider.google.lists" = "";
|
|
"browser.safebrowsing.provider.google.reportMalwareMistakeURL" = "";
|
|
"browser.safebrowsing.provider.google.reportPhishMistakeURL" = "";
|
|
"browser.safebrowsing.provider.google.reportURL" = "";
|
|
"browser.safebrowsing.provider.google.updateURL" = "";
|
|
"browser.safebrowsing.provider.google4.advisoryURL" = "";
|
|
"browser.safebrowsing.provider.google4.dataSharingURL" = "";
|
|
"browser.safebrowsing.provider.google4.gethashURL" = "";
|
|
"browser.safebrowsing.provider.google4.lists" = "";
|
|
"browser.safebrowsing.provider.google4.reportMalwareMistakeURL" = "";
|
|
"browser.safebrowsing.provider.google4.reportPhishMistakeURL" = "";
|
|
"browser.safebrowsing.provider.google4.reportURL" = "";
|
|
"browser.safebrowsing.provider.google4.updateURL" = "";
|
|
"browser.safebrowsing.provider.mozilla.gethashURL" = "";
|
|
"browser.safebrowsing.provider.mozilla.lists" = "";
|
|
"browser.safebrowsing.provider.mozilla.updateURL" = "";
|
|
"browser.search.suggest.enabled" = false;
|
|
"browser.search.widget.inNavBar" = true;
|
|
"browser.startup.page" = 0;
|
|
"extensions.pocket.enabled" = false;
|
|
"extensions.update.enabled" = false;
|
|
"identity.fxaccounts.enabled" = false;
|
|
"keyword.enabled" = false;
|
|
"network.captive-portal-service.enabled" = false;
|
|
"network.predictor.enabled" = false;
|
|
"privacy.donottrackheader.enabled" = true;
|
|
"startup.homepage_welcome_url" = "about:blank";
|
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
|
"toolkit.telemetry.archive.enabled" = false;
|
|
"toolkit.telemetry.bhrPing.enabled" = false;
|
|
"toolkit.telemetry.firstShutdownPing.enabled" = false;
|
|
"toolkit.telemetry.newProfilePing.enabled" = false;
|
|
"toolkit.telemetry.server" = "http://127.0.0.1:4711";
|
|
"toolkit.telemetry.server_owner" = "";
|
|
"toolkit.telemetry.shutdownPingSender.enabled" = false;
|
|
"toolkit.telemetry.updatePing.enabled" = false;
|
|
"urlclassifier.downloadAllowTable" = "";
|
|
"urlclassifier.downloadBlockTable" = "";
|
|
"urlclassifier.malwareTable" = "";
|
|
"urlclassifier.phishTable" = "";
|
|
"datareporting.healthreport.uploadEnabled" = "";
|
|
"app.normandy.api_url" = "";
|
|
"breakpad.reportURL" = "";
|
|
"browser.region.network.url" = "";
|
|
"browser.search.geoSpecificDefaults.url" = "";
|
|
"browser.shell.checkDefaultBrowser" = false;
|
|
|
|
"privacy.userContext.enabled" = true;
|
|
"privacy.userContext.ui.enabled" = true;
|
|
"network.dnsCacheExpiration" = 0;
|
|
|
|
# disable disk cache to reduce ssd writes
|
|
"browser.cache.disk.enable" = false;
|
|
"browser.cache.memory.enable" = true;
|
|
"browser.cache.memory.capacity" = -1;
|
|
};
|
|
|
|
userChrome = builtins.readFile ./userChrome.css;
|
|
};
|
|
};
|
|
|
|
programs.browserpass = {
|
|
enable = true;
|
|
browsers = [ "firefox" ];
|
|
};
|
|
|
|
xdg.configFile."treestyletab.css".source = ./treestyletab.css;
|
|
}
|