Add firefox config

Signed-off-by: Tristan Druyen <tristan@vault81.de>
This commit is contained in:
Tristan D. 2023-09-19 02:51:21 +02:00
parent 167cf0b7ef
commit 881cc61845
Signed by: tristan
SSH key fingerprint: SHA256:U7y6eMb7CQDaTHv9XoX6/BaQnPqyxxKc+Xnfcefi6rY
5 changed files with 231 additions and 2 deletions

View file

@ -37,4 +37,7 @@ sudo nixos-rebuild --flake .#nixos-pulse switch
- NixOS: https://nixos.org/
- https://github.com/nix-community/nixos-anywhere
- https://github.com/nix-community/disko
- Countless great examples e.g.:
- https://github.com/etu/nixconfig
- https://github.com/hlissner/dotfiles
- Caffeine https://en.wikipedia.org/wiki/Caffeine

View file

@ -110,6 +110,7 @@
environment.sessionVariables = {
EDITOR = "nvim";
MOZ_USE_XINPUT2 = "1";
MOZ_ENABLE_WAYLAND = "1";
};
environment.systemPackages = with pkgs; [

16
flake.lock generated
View file

@ -145,12 +145,28 @@
"type": "github"
}
},
"nur": {
"locked": {
"lastModified": 1695076089,
"narHash": "sha256-OcCwDYZYErSz8QCtLvqMQkJufByS4r74SCTL9N3YGBk=",
"owner": "nix-community",
"repo": "NUR",
"rev": "1152aa48c3e88af00f2a3b2ff8af9d3c14cf5d72",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"root": {
"inputs": {
"disko": "disko",
"emacs-overlay": "emacs-overlay",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nur": "nur",
"tuxedo-nixos": "tuxedo-nixos"
}
},

View file

@ -1,4 +1,3 @@
# /etc/nixos/flake.nix
{
description = "flake for nixos-pulse";
@ -21,6 +20,10 @@
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
nur = {
url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
@ -30,6 +33,7 @@
tuxedo-nixos,
emacs-overlay,
disko,
nur,
}: {
formatter = {
x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
@ -55,6 +59,7 @@
disko.nixosModules.disko
home-manager.nixosModules.home-manager
tuxedo-nixos.nixosModules.default
nur.nixosModules.nur
{
nixpkgs.pkgs = customPkgs;
home-manager.useUserPackages = true;

206
home.nix
View file

@ -1,4 +1,8 @@
{pkgs, ...}: {
{
pkgs,
config,
...
}: {
fonts.fonts = [pkgs.emacs-all-the-icons-fonts];
users.users.tristand = {
@ -41,6 +45,206 @@
programs.fish.enable = true;
programs.firefox = {
enable = true;
profiles = {
default = {
isDefault = true;
settings = {
# Extensions are managed with Nix, so don't update.
"extensions.update.autoUpdateDefault" = false;
"extensions.update.enabled" = false;
# Sync
# "services.sync.username" = config.etu.user.email;
"services.sync.engine.addons" = false; # Do not sync extensions.
"general.autoScroll" = true; # Middle click to scroll
"browser.startup.page" = 3; # Restore previous windows and tabs.
# Privacy enhancements
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
"browser.newtabpage.activity-stream.telemetry" = false;
"browser.newtabpage.activity-stream.feeds.snippets" = false;
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
"browser.newtabpage.activity-stream.showSponsored" = false;
"browser.newtabpage.activity-stream.feeds.discoverystreamfeed" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
# Improve performance
"gfx.webrender.all" = true;
# Do Not Track header
"privacy.donottrackheader.enabled" = true;
"privacy.donottrackheader.value" = 1;
# Enable userChrome customisations
# "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
};
extensions = with config.nur.repos.rycee.firefox-addons; [
betterttv
bitwarden
clearurls
consent-o-matic
darkreader
localcdn
onetab
plasma-integration
privacy-badger
rust-search-extension
skip-redirect
sponsorblock
ublock-origin
unpaywall
];
search = {
force = true;
default = "DuckDuckGo";
order = ["DuckDuckGo" "Nix Packages" "Nix Options" "NixOS Wiki"];
engines = {
"DuckDuckGo".metaData = {
alias = "@ddg";
};
"Nix Packages" = {
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "/run/current-system/sw/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@np"];
};
"Nix Options" = {
urls = [
{
template = "https://search.nixos.org/options";
params = [
{
name = "type";
value = "options";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "/run/current-system/sw/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@no"];
};
"Home-Manager Options" = {
urls = [
{
template = "https://mipmip.github.io/home-manager-option-search";
params = [
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "/run/current-system/sw/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@ho"];
};
"NixOS Wiki" = {
urls = [
{
template = "https://nixos.wiki/index.php?search={searchTerms}";
}
];
iconUpdateURL = "https://nixos.wiki/favicon.png";
updateInterval = 24 * 60 * 60 * 1000;
definedAliases = ["@nw"];
};
"Bing".metaData.hidden = true;
"Amazon.de".metaData.hidden = true;
"Google".metaData = {
alias = "@g";
hidden = true;
};
};
};
bookmarks = [
{
toolbar = true;
bookmarks = [
{
name = "Home Manager";
url = "https://nixos.wiki/wiki/Home_Manager";
}
];
}
{
name = "wikipedia";
tags = ["wiki"];
keyword = "wiki";
url = "https://en.wikipedia.org/wiki/Special:Search?search=%s&go=Go";
}
{
name = "kernel.org";
url = "https://www.kernel.org";
}
{
name = "Nix sites";
bookmarks = [
{
name = "homepage";
url = "https://nixos.org/";
}
{
name = "wiki";
tags = ["wiki" "nix"];
url = "https://nixos.wiki/";
}
{
name = "Nix sites";
bookmarks = [
{
name = "homepage";
url = "https://nixos.org/";
}
{
name = "wiki";
url = "https://nixos.wiki/";
}
];
}
];
}
];
};
};
};
programs.git = {
enable = true;
userName = "Tristan Druyen";