mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
add(nixos): firefox config
This commit is contained in:
parent
7605c579ba
commit
59c3aa4514
4 changed files with 172 additions and 21 deletions
129
nix/home/browser.nix
Normal file
129
nix/home/browser.nix
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
{ pkgs, nur, ... }: {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.firefox-esr;
|
||||
policies =
|
||||
{ # https://mozilla.github.io/policy-templates/#hardwareacceleration
|
||||
# some options only works with firefox-esr
|
||||
DisableFirefoxScreenshots = true;
|
||||
DisablePocket = true;
|
||||
DisplayMenuBar = "never";
|
||||
DisplayBookmarksToolbar = "never";
|
||||
NoDefaultBookmarks = true;
|
||||
OfferToSaveLogins = false;
|
||||
OfferToSaveLoginsDefault = false;
|
||||
PasswordManagerEnabled = false;
|
||||
FirefoxHome = {
|
||||
Search = true;
|
||||
TopSites = true;
|
||||
SponsoredTopSites = false;
|
||||
Highlights = false;
|
||||
Pocket = false;
|
||||
SponsoredPocket = false;
|
||||
};
|
||||
UserMessaging = {
|
||||
ExtensionRecommendations = false;
|
||||
SkipOnboarding = true;
|
||||
};
|
||||
DNSOverHTTPS = { Enabled = true; };
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
||||
Cryptomining = true;
|
||||
Fingerprinting = true;
|
||||
};
|
||||
SearchEngines = {
|
||||
Default = "searxng";
|
||||
Add = [
|
||||
{
|
||||
Name = "invidious";
|
||||
URLTemplate = "https://invidious.earth2077.fr/q={searchTerms}";
|
||||
Alias = "@yt";
|
||||
}
|
||||
{
|
||||
Name = "searxng";
|
||||
URLTemplate =
|
||||
"https://searxng.earth2077.fr/search?q={searchTerms}";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
profiles.leana = {
|
||||
id = 0;
|
||||
name = "leana";
|
||||
search = {
|
||||
force = true;
|
||||
default = "searxng";
|
||||
engines = {
|
||||
Searxng = {
|
||||
urls = [{
|
||||
template = "https://searxng.earth2077.fr/search";
|
||||
params = [{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}];
|
||||
}];
|
||||
};
|
||||
Invidious = {
|
||||
urls = [{
|
||||
template = "https://invidious.earth2077.fr/search";
|
||||
params = [{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}];
|
||||
}];
|
||||
definedAliases = [ "@yt" ];
|
||||
};
|
||||
"Nix Packages" = {
|
||||
urls = [{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}];
|
||||
icon =
|
||||
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@np" ];
|
||||
};
|
||||
"NixOS Wiki" = {
|
||||
urls = [{
|
||||
template = "https://nixos.wiki/index.php?search={searchTerms}";
|
||||
}];
|
||||
iconUpdateURL = "https://nixos.wiki/favicon.png";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = [ "@nw" ];
|
||||
};
|
||||
"Wikipedia (en)".metaData.alias = "@wk";
|
||||
};
|
||||
};
|
||||
settings = { "general.smoothScroll" = true; };
|
||||
extraConfig = ''
|
||||
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
|
||||
user_pref("full-screen-api.ignore-widgets", true);
|
||||
user_pref("media.ffmpeg.vaapi.enabled", true);
|
||||
user_pref("media.rdd-vpx.enabled", true);
|
||||
'';
|
||||
userChrome = ''
|
||||
# a css
|
||||
'';
|
||||
userContent = ''
|
||||
# Here too
|
||||
'';
|
||||
extensions = with nur.repos.rycee.firefox-addons; [
|
||||
ublock-origin
|
||||
privacy-badger
|
||||
sponsorblock
|
||||
bitwarden
|
||||
tridactyl
|
||||
languagetool
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,12 +1,5 @@
|
|||
{
|
||||
pkgs,
|
||||
unstable,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./dev.nix
|
||||
./gui.nix
|
||||
];
|
||||
{ pkgs, unstable, ... }: {
|
||||
imports = [ ./dev.nix ./gui.nix ./browser.nix];
|
||||
|
||||
home = {
|
||||
username = "leana";
|
||||
|
|
@ -16,13 +9,13 @@
|
|||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
firefox.enable = true;
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# shell and script dependencies
|
||||
fish
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue