gitea repo
This commit is contained in:
commit
f610209aff
66 changed files with 2439 additions and 0 deletions
93
modules/apps/55_firefox.nix
Normal file
93
modules/apps/55_firefox.nix
Normal file
|
@ -0,0 +1,93 @@
|
|||
{ config, pkgs, firefox-addons, ... }:
|
||||
|
||||
let
|
||||
autoconfigCfg = pkgs.writeText "autoconfig.cfg" ''
|
||||
var {classes:Cc,interfaces:Ci,utils:Cu} = Components;
|
||||
/* set new tab page */
|
||||
try {
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
});
|
||||
var newTabURL = "https://mainframe.local/mainframe.html";
|
||||
AboutNewTab.newTabURL = newTabURL;
|
||||
} catch(e){Cu.reportError(e);} // report errors in the Browser Console
|
||||
'';
|
||||
|
||||
autoconfigJs = pkgs.writeText "autoconfig.js" ''
|
||||
pref("general.config.filename", "autoconfig.cfg");
|
||||
pref("general.config.obscure_value", 0);
|
||||
pref("general.config.sandbox_enabled", false);
|
||||
'';
|
||||
|
||||
firefoxWithAutoconfig = pkgs.firefox.overrideAttrs (oldAttrs: {
|
||||
buildCommand = oldAttrs.buildCommand + ''
|
||||
# Copy autoconfig files to the Firefox installation
|
||||
cp ${autoconfigJs} $out/lib/firefox/defaults/pref/autoconfig.js
|
||||
cp ${autoconfigCfg} $out/lib/firefox/autoconfig.cfg
|
||||
'';
|
||||
});
|
||||
|
||||
in {
|
||||
config = {
|
||||
home-manager.users.${config.user} = { pkgs, ... }: {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = firefoxWithAutoconfig;
|
||||
profiles.default = {
|
||||
settings = {
|
||||
"browser.startup.homepage" = "https://mainframe.local/mainframe.html";
|
||||
"sidebar.verticalTabs" = true;
|
||||
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
|
||||
"browser.contentblocking.category" = { Value = "strict"; Status = "locked"; };
|
||||
"toolkit.telemetry.server" = "127.0.0.1";
|
||||
"toolkit.telemetry.server_owner" = "localhost";
|
||||
"extensions.pocket.enabled" = false;
|
||||
"extensions.screenshots.disabled" = true;
|
||||
"browser.topsites.contile.enabled" = false;
|
||||
"browser.formfill.enable" = false;
|
||||
"browser.search.suggest.enabled" = false;
|
||||
"browser.search.suggest.enabled.private" = false;
|
||||
"browser.urlbar.suggest.searches" = false;
|
||||
"browser.urlbar.showSearchSuggestionsFirst" = false;
|
||||
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
|
||||
"browser.newtabpage.activity-stream.feeds.snippets" = false;
|
||||
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
|
||||
"browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = false;
|
||||
"browser.newtabpage.activity-stream.section.highlights.includeDownloads" = false;
|
||||
"browser.newtabpage.activity-stream.section.highlights.includeVisited" = false;
|
||||
"browser.newtabpage.activity-stream.showSponsored" = false;
|
||||
"browser.newtabpage.activity-stream.system.showSponsored" = false;
|
||||
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
||||
|
||||
};
|
||||
extensions.packages = with firefox-addons; [
|
||||
noscript
|
||||
ublock-origin
|
||||
sponsorblock
|
||||
];
|
||||
};
|
||||
policies = {
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxStudies = true;
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
||||
Locked = true;
|
||||
Cryptomining = true;
|
||||
Fingerprinting = true;
|
||||
};
|
||||
DisablePocket = true;
|
||||
DisableFirefoxAccounts = true;
|
||||
DisableAccounts = true;
|
||||
DisableFirefoxScreenshots = true;
|
||||
OverrideFirstRunPage = "";
|
||||
OverridePostUpdatePage = "";
|
||||
DontCheckDefaultBrowser = true;
|
||||
DisplayBookmarksToolbar = "never"; # alternatives: "always" or "newtab"
|
||||
DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on"
|
||||
SearchBar = "unified"; # alternative: "separate"
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue