Firefox config

Former-commit-id: c8aff9ee96
This commit is contained in:
Hadi
2024-11-25 09:33:56 +01:00
parent bbfd3a5de2
commit ff5a75f687
3 changed files with 241 additions and 1 deletions

View File

@@ -91,6 +91,10 @@ in {
DisableAccounts = true;
"AutofillAddressEnabled" = false;
"AutofillCreditCardEnabled" = false;
Preferences = {
"extensions.autoDisableScopes" = 0; # Automatically enable extensions
"extensions.update.enabled" = false;
};
};
profiles."default" = {
@@ -99,6 +103,8 @@ in {
name = "default";
settings = {
"app.normandy.first_run" = false;
"browser.uidensity" = 1;
"bookmarks.restore_default_bookmarks" = false;
"browser.bookmarks.addedImportButton" = false;
"browser.toolbars.bookmarks.visibility" = "always";
@@ -116,6 +122,12 @@ in {
title = "Homepage";
url = "${homepage}/build/index.html";
}];
services.sync.engine.addons = false;
services.sync.nextSync = 0;
signon.firefoxRelay.feature = "disabled";
signon.generation.enabled = "false";
};
bookmarks = [
{
@@ -149,7 +161,13 @@ in {
];
}
];
extensions = with pkgs.nur.repos.rycee.firefox-addons; [ privacy-badger ];
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
privacy-badger
ublock-origin
vimium
sponsorblock
youtube-recommended-videos
];
search = {
order = [ "google" "duckduckgo" "wikipedia" ];
engines = {
@@ -188,7 +206,150 @@ in {
"@g"; # builtin engines only support specifying one additional alias
};
default = "DuckDuckGo";
};
userChrome = ''
/* Base color for the theme, dependent on whether it's a light theme or not */
@media (prefers-color-scheme: dark) {
:root {
--accent-color: #11111b;
}
}
@media (prefers-color-scheme: light) {
:root {
--accent-color: #dce0e8;
}
}
/*====== Aesthetics ======*/
#navigator-toolbox {
border-bottom: none !important;
}
#titlebar {
background: var(--accent-color) !important;
}
/* Sets the toolbar color */
toolbar#nav-bar {
background: var(--accent-color) !important;
box-shadow: none !important;
}
/* Sets the URL bar color */
#urlbar {
background: var(--accent-color) !important;
}
#urlbar-background {
background: var(--accent-color) !important;
border: none !important;
}
#urlbar-input-container {
border: none !important;
}
/*====== UI Settings ======*/
:root {
--navbarWidth: 500px;
/* Set width of navbar */
}
/* If the window is wider than 1000px, use flex layout */
@media (min-width: 1000px) {
#navigator-toolbox {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
/* Url bar */
#nav-bar {
order: 2;
width: var(--navbarWidth);
}
/* Tab bar */
#titlebar {
order: 1;
width: calc(100vw - var(--navbarWidth) - 1px);
}
/* Bookmarks bar */
#PersonalToolbar {
order: 3;
width: 100%;
}
/* Fix urlbar sometimes being misaligned */
:root[uidensity="compact"] #urlbar {
--urlbar-toolbar-height: 39.60px !important;
}
:root[uidensity="touch"] #urlbar {
--urlbar-toolbar-height: 49.00px !important;
}
}
/*====== Simplifying interface ======*/
/* Autohide back button when disabled */
#back-button,
#forward-button,
/* Remove UI elements */
#identity-box,
/* Site information */
#tracking-protection-icon-container,
/* Shield icon */
#page-action-buttons> :not(#urlbar-zoom-button, #star-button-box),
/* All url bar icons except for zoom level and bookmarks */
#urlbar-go-button,
/* Search URL magnifying glass */
#alltabs-button,
/* Menu to display all tabs at the end of tabs bar */
.titlebar-buttonbox-container
/* Minimize, maximize, and close buttons */
{
display: none !important;
}
#nav-bar {
box-shadow: none !important;
}
/* Remove "padding" left and right from tabs */
.titlebar-spacer {
display: none !important;
}
/* Fix URL bar overlapping elements */
#urlbar-container {
min-width: none !important;
}
/* Remove gap after pinned tabs */
#tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs])>#tabbrowser-arrowscrollbox>.tabbrowser-tab[first-visible-unpinned-tab] {
margin-inline-start: 0 !important;
}
/* Hide the hamburger menu */
#PanelUI-menu-button {
padding: 0px !important;
}
#PanelUI-menu-button .toolbarbutton-icon {
width: 0px !important;
}
#PanelUI-menu-button .toolbarbutton-badge-stack {
padding: 0px !important;
}'';
};
# profiles = {
# default = {

View File

@@ -0,0 +1,78 @@
{ pkgs, config, ... }:
let
accent = "#${config.lib.stylix.colors.base0D}";
background = "#${config.lib.stylix.colors.base00}";
foreground = "#${config.lib.stylix.colors.base05}";
muted = "#${config.lib.stylix.colors.base03}";
settings = ''
{
"config": {
"title" : "Welcome Home",
"openLinksInNewTab": false,
"locale": "fr-FR",
"colors": {
"primary": "${accent}",
"background": "${background}",
"foreground": "${foreground}",
"muted": "#${muted}"
},
"folders": [
{
"name": "Bookmarks",
"links": [
{"title": "MyNixOs", "url": "https://mynixos.com", "icon": "󱄅"},
{"title": "Github", "url": "https://github.com", "icon": ""},
{"title": "Proton", "url": "https://mail.proton.me/u/0/inbox", "icon": ""},
{"title": "Cloudflare One", "url": "https://one.dash.cloudflare.com/", "icon": ""},
{"title": "Chat GPT", "url": "https://chat.openai.com/", "icon": "󰭹"},
{"title": "Nixvim", "url": "https://nix-community.github.io/nixvim/", "icon": ""},
{"title": "Hyprland Wiki", "url": "https://wiki.hyprland.org/", "icon": "󰖬"},
{"title": "Youtube", "url": "https://youtube.com", "icon": "󰗃"},
{"title": "Figma", "url": "https://figma.com", "icon": ""},
{"title": "Server", "url": "https://home.anotherhadi.com", "icon": ""}
]
},
{
"name": "Work",
"links": [
{"title": "Outlook", "url": "https://outlook.office.com/mail/", "icon": "󰴢"},
{"title": "Office", "url": "https://www.office.com/?auth=2", "icon": "󰏆"},
{"title": "Teams", "url": "https://teams.microsoft.com/_", "icon": "󰊻"}
]
}
]
}
}
'';
homepage = pkgs.buildNpmPackage {
pname = "homepage";
version = "0.0.0";
src = pkgs.fetchFromGitHub {
owner = "anotherhadi";
repo = "homepage";
rev = "b77d35ed3596eb451bd2ec78063d7cc6e73c773d";
hash = "sha256-j/40922kfAh6zqJ4IRYpr66YXNNYsxuXwZ0aiJFJea0=";
};
# npmDepsHash = lib.fakeHash;
npmDepsHash = "sha256-bG+CHTq2Rst3JMxsjAC81KhK+G7WwsTVD1eyP87g0z4=";
buildPhase = ''
npm install
cp ${
pkgs.writeText "src/routes/config.json" settings
} src/routes/config.json
npm run build
mkdir $out
mv build $out
'';
meta = {
description = "homepage";
homepage = "https://github.com/anotherhadi/homepage";
};
};
in { home.file.".config/serverhomepage" = { source = homepage; }; }

View File

@@ -18,6 +18,7 @@
../../home/programs/lazygit
../../home/programs/nh
../../home/programs/firefox
../../home/programs/server-page
# Scripts
../../home/scripts # All scripts