NixOS-Config/home-manager/desktop/package-configs/firefox.nix

396 lines
19 KiB
Nix
Raw Normal View History

{
config,
pkgs,
...
}: {
programs.firefox = {
enable = true;
nativeMessagingHosts = [pkgs.firefoxpwa];
package = pkgs.firefox;
profiles.lillian = {
isDefault = true;
settings = {
"browser.aboutConfig.showWarning" = false;
"browser.bookmarks.addedImportButton" = true;
"browser.bookmarks.restore_default_bookmarks" = false;
"browser.bookmarks.showMobileBookmarks" = true;
"browser.ctrlTab.sortByRecentlyUsed" = true;
"browser.discovery.enabled" = false;
"browser.download.panel.shown" = true;
"browser.firefox-view.feature-tour" = "{\"message\":\"FIREFOX_VIEW_FEATURE_TOUR\",\"screen\":\"\",\"complete\":true}";
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
"browser.pageActions.persistedActions" = ''{"ids":["bookmark","_3c078156-979c-498b-8990-85f7987dd929_","firefoxpwa_filips_si"],"idsInUrlbar":["_3c078156-979c-498b-8990-85f7987dd929_","firefoxpwa_filips_si","bookmark"],"idsInUrlbarPreProton":[],"version":1}'';
"browser.search.region" = "NL";
2024-04-24 14:10:06 +02:00
"browser.uiCustomization.state" = ''{"placements":{"widget-overflow-fixed-list":[],"unified-extensions-area":["jid1-mnnxcxisbpnsxq_jetpack-browser-action","firefoxpwa_filips_si-browser-action","ubo-scope_raymondhill_net-browser-action","treestyletab_piro_sakura_ne_jp-browser-action","wayback_machine_mozilla_org-browser-action","plasma-browser-integration_kde_org-browser-action","kde-connect_0xc0dedbad_com-browser-action","_f209234a-76f0-4735-9920-eb62507a54cd_-browser-action","bibitnow018_aqpl_mc2_chalmers_se-browser-action","_09b14d46-21c3-4a7d-b244-e756f497935b_-browser-action","_7fc8ef53-24ec-4205-87a4-1e745953bb0d_-browser-action","_74145f27-f039-47ce-a470-a662b129930a_-browser-action","_800215d6-eff0-4a62-9268-09857c048030_-browser-action","_b3e677f4-1150-4387-8629-da738260a48e_-browser-action","_d133e097-46d9-4ecc-9903-fa6a722a6e0e_-browser-action","myallychou_gmail_com-browser-action","_b7f9d2cd-d772-4302-8c3f-eb941af36f76_-browser-action","_cca112bb-1ca6-4593-a2f1-38d808a19dda_-browser-action","gdpr_cavi_au_dk-browser-action","_54da8dcf-a015-4c80-bbb4-db7f226ac7bd_-browser-action","jid1-om7ejgwa1u8akg_jetpack-browser-action","_7c1aa46e-b74f-4325-95d2-84c07d19cdce_-browser-action","_3c078156-979c-498b-8990-85f7987dd929_-browser-action","7esoorv3_alefvanoon_anonaddy_me-browser-action","_15b1b2af-e84a-4c70-ac7c-5608b0eeed5a_-browser-action","_b9db16a4-6edc-47ec-a1f4-b86292ed211d_-browser-action","dontfuckwithpaste_raim_ist-browser-action"],"nav-bar":["back-button","forward-button","stop-reload-button","urlbar-container","customizableui-special-spring2","downloads-button","_testpilot-containers-browser-action","addon_darkreader_org-browser-action","umatrix_raymondhill_net-browser-action","ublock0_raymondhill_net-browser-action","_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action","_3579f63b-d8ee-424f-bbb6-6d0ce3285e6a_-browser-action","woop-noopscoopsnsxq_jetpack-browser-action","jid1-bofifl9vbdl2zq_jetpack-browser-action","cookieautodelete_kennydo_com-browser-action","addon_simplelogin-browser-action","jid1-aqqsmbyb0a8adg_jetpack-browser-action","unified-extensions-button","reset-pbm-toolbar-button"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","alltabs-button","_c607c8df-14a7-4f28-894f-29e8722976af_-browser-action"],"PersonalToolbar":["import-button","personal-bookmarks"]},"seen":["save-to-pocket-button","developer-button","treestyletab_piro_sakura_ne_jp-browser-action","addon_darkreader_org-browser-action","_testpilot-containers-browser-action","wayback_machine_mozilla_org-browser-action","plasma-browser-integration_kde_org-browser-action","_c607c8df-14a7-4f28-894f-29e8722976af_-browser-action","kde-connect_0xc0dedbad_com-browser-action","_f209234a-76f0-4735-9920-eb62507a54cd_-browser-action","ublock0_raymondhill_net-browser-action","cookieautodelete_kennydo_com-browser-action","bibitnow018_aqpl_mc2_chalmers_se-browser-action","_09b14d46-21c3-4a7d-b244-e756f497935b_-browser-action","_7fc8ef53-24ec-4205-87a4-1e745953bb0d_-browser-action","woop-noopscoopsnsxq_jetpack-browser-action","_74145f27-f039-47ce-a470-a662b129930a_-browser-action","_800215d6-eff0-4a62-9268-09857c048030_-browser-action","_3579f63b-d8ee-424f-bbb6-6d0ce3285e6a_-browser-action","_b3e677f4-1150-4387-8629-da738260a48e_-browser-action","_d133e097-46d9-4ecc-9903-fa6a722a6e0e_-browser-action","jid1-bofifl9vbdl2zq_jetpack-browser-action","_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action","myallychou_gmail_com-browser-action","_b7f9d2cd-d772-4302-8c3f-eb941af36f76_-browser-action","umatrix_raymondhill_net-browser-action","_cca112bb-1ca6-4593-a2f1-38d808a19dda_-browser-action","gdpr_cavi_au_dk-browser-action","_54da8dcf-a015-4c80-bbb4-db7f226ac7bd_-browser-action","ubo-scope_raymondhill_net-browser-action","jid1-om7ejgwa1u8akg_jetpack-browser-action","_7c1aa46e-b74f-4325-95d2-84c07d19cdce_-browser-action","_3c078156-979c-498b-8990-85f7987dd929_-browser-action","addon_simplelogin-browser-action","7esoorv3_alefvanoon_anonaddy_me-browser-action","jid1-aqqsmbyb0a8adg_jetpack-browser-action","_15b1b2af
"browser.urlbar.placeholderName" = "DuckDuckGo";
"browser.urlbar.placeholderName.private" = "DuckDuckGo";
"extensions.webextensions.uuid" = ''{"formautofill@mozilla.org":"ea6a95e0-ef85-453b-afdf-44e57e4ca32c","pictureinpicture@mozilla.org":"41fcca40-5f8a-4182-ace9-e1ff2e6fc210","screenshots@mozilla.org":"8c2c3f97-17a1-4240-b640-c9707e3b917e","webcompat-reporter@mozilla.org":"d2c1a84b-03ff-47c6-92be-a623026b79d9","webcompat@mozilla.org":"bb5b827a-1ad3-40d0-8c16-c7d6db11a62b","default-theme@mozilla.org":"83700f73-6c25-4599-9393-3e071be81fe6","wayback_machine@mozilla.org":"ef76899f-67d6-4ffb-973f-0c198a8369e4","uBlock0@raymondhill.net":"24e7b891-a28c-4555-b072-0ee184115cb4","DontFuckWithPaste@raim.ist":"6dbb9616-e8c9-40ff-a729-01dcd6fe09b4","uBO-Scope@raymondhill.net":"6afd83ed-7f93-41ad-960c-28c5ec5ac9bd","gdpr@cavi.au.dk":"4577a4f9-84e4-400c-a995-9b13640f3620","addon@simplelogin":"e492ff49-9c0e-4c42-ab28-465563e953b9","addons-search-detection@mozilla.com":"63a9d1fb-3c16-4b40-bd69-de186c138c5e","plasma-browser-integration@kde.org":"e655920d-846c-4a72-918e-86ebb25362a6","firefoxpwa@filips.si":"3ce26b62-9349-47cc-beaa-584b0c737979","addon@darkreader.org":"510c480d-7737-47ad-91a0-5b8e8f3745c3","shinigamieyes@shinigamieyes":"8f3b1099-f3b1-4468-915d-60fbfbfda8ce","7esoorv3@alefvanoon.anonaddy.me":"947c1016-2e39-48cd-ae1a-c301a6531d2a","CookieAutoDelete@kennydo.com":"28ccdbbd-d179-472a-8658-ae97d228f958","jid1-MnnxcxisBPnSXQ@jetpack":"f361e1b5-74bf-4073-ae95-245429a12cad","jid1-AQqSMBYb0a8ADg@jetpack":"8f3e6fd5-f009-4d2e-b501-0ec6b18dcf9e","wikipedia@search.mozilla.org":"c615bbc5-9fa2-48ae-a78d-7e5546c1a94e","ddg@search.mozilla.org":"4f7e3183-d053-40f6-b7b2-8f405f033281","{446900e4-71c2-419f-a6a7-df9c091e268b}":"bccbf892-7089-4d89-b886-a667e6fd9a03","{3c078156-979c-498b-8990-85f7987dd929}":"f3f046fa-c1b9-415d-b79b-236109b3926b"}'';
2024-04-21 22:30:24 +02:00
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.searchEngines" = "DuckDuckGo";
};
userChrome = ''
/*
2024-08-29 11:46:26 +02:00
Title: Drannex42's FirefoxSidebar / Vertical Tabs
Description: Vertical tab design for Firefox with dynamic indentation::
Sideberry and TreeStyleTabs (Legacy) themes available!
Repository URL: https://github.com/drannex42/FirefoxSidebar
Version: 12022.04.17
*/
:root {
2024-08-29 11:46:26 +02:00
--sidebar-width: 50px;
--toolbar-height: 10px;
--menubar-height: 100px;
--sidebar-padding: calc(var(--sidebar-width) + 5px);
--toolbar-start-end-padding: 5px !important;
2024-08-29 11:46:26 +02:00
/* Custom Sidebar/Header Backround ::
This sets the background for the other sidebar options (bookmarks, history, in case it is transparent from a theme that is not set up properly
2024-08-29 11:46:26 +02:00
*/
/* --custom-sidebar-bg: Field; /* Default: Field (Disabled) */
2024-08-29 11:46:26 +02:00
/* --custom-sidebar-header-bg: #000; */
2024-08-29 11:46:26 +02:00
/* ====== Extension Settings ====== */
2024-08-29 11:46:26 +02:00
/* Window Control / Client Side Display Settings ===
If you are putting this on the left or right side uncomment the side
preferences below and comment the other
=========================================================================
2024-08-29 11:46:26 +02:00
*/
--csd-width: 100px;
--csd-top: 8px;
/*
2024-08-29 11:46:26 +02:00
CSD - Left Side ===
Default: --csd-left: 50px; --csd-margin-left: 92px;
*/
2024-08-29 11:46:26 +02:00
/*
--csd-left: 50px;
--csd-margin-left: 92px;
*/
/*
2024-08-29 11:46:26 +02:00
CSD - Right Side ===
Defaults: --csd-right: 0px; --csd-margin-right: 95px;
*/
2024-08-29 11:46:26 +02:00
--csd-right: 36px;
--csd-margin-right: 130px;
2024-08-29 11:46:26 +02:00
/* === END: Window Control / Client Side Display Settings === */
2024-08-29 11:46:26 +02:00
/* === END: Extension Settings === */
}
/* ========================================================================= */
/*
2024-08-29 11:46:26 +02:00
Extension (Core): Sidebar
Description: This is the core implementation of the sidebar used in drannex42's FirefoxSidebar.
Repository URL: https://github.com/drannex42/FirefoxSidebar
Version: v12024.05.15 (YYYYY.MM.DD)
*/
#main-window #TabsToolbar {
2024-08-29 11:46:26 +02:00
visibility: collapse;
}
2024-08-29 11:46:26 +02:00
/* As of v12024.05.15 we updated to using this one by MrOtherGuy, with modifications */
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_sidebar.css made available under Mozilla Public License v. 2.0 */
/* Show sidebar only when the cursor is over it */
/* The border controlling sidebar width will be removed so you'll need to modify these values to change width */
2024-08-29 11:46:26 +02:00
#sidebar-box {
--uc-sidebar-width: 50px;
--uc-sidebar-hover-width: 260px;
--uc-autohide-sidebar-delay: 10ms;
/* Wait 0.6s before hiding sidebar */
--uc-autohide-transition-duration: 115ms;
--uc-autohide-transition-type: linear;
position: relative;
min-width: var(--uc-sidebar-width) !important;
width: var(--uc-sidebar-width) !important;
max-width: var(--uc-sidebar-width) !important;
z-index: 1;
margin-top: -40px;
}
2024-08-29 11:46:26 +02:00
#sidebar-box[positionend] {
direction: rtl
}
2024-08-29 11:46:26 +02:00
#sidebar-box[positionend]>* {
direction: ltr
}
2024-08-29 11:46:26 +02:00
#sidebar-box[positionend]:-moz-locale-dir(rtl) {
direction: ltr
}
#sidebar-box[positionend]:-moz-locale-dir(rtl)>* {
direction: rtl
}
#main-window[sizemode="fullscreen"] #sidebar-box {
--uc-sidebar-width: 1px;
}
#sidebar-splitter {
display: none
}
#sidebar-header {
2024-08-29 11:46:26 +02:00
overflow: hidden;
color: var(--chrome-color, inherit) !important;
padding-inline: 0 !important;
background: var(--custom-sidebar-header-bg, inherit) !important;
padding: 8px 12px !important;
padding-top: 9px !important;
border-bottom: none !Important;
}
2024-08-29 11:46:26 +02:00
#sidebar-header::before,
#sidebar-header::after {
content: "";
display: flex;
padding-left: 0px;
}
2024-08-29 11:46:26 +02:00
#sidebar-header,
#sidebar {
transition: min-width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important;
min-width: var(--uc-sidebar-width) !important;
will-change: min-width;
}
2024-08-29 11:46:26 +02:00
#sidebar-box:hover>#sidebar-header,
#sidebar-box:hover>#sidebar {
min-width: var(--uc-sidebar-hover-width) !important;
width: var(--uc-sidebar-hover-width) !important;
transition-delay: 0ms !important;
}
2024-08-29 11:46:26 +02:00
#sidebar-box>#sidebar-header #sidebar-title {
opacity: 0;
}
2024-08-29 11:46:26 +02:00
#sidebar-box:hover>#sidebar-header #sidebar-title {
opacity: 1;
}
2024-08-29 11:46:26 +02:00
.sidebar-panel {
background-color: transparent !important;
color: var(--newtab-text-primary-color) !important;
}
2024-08-29 11:46:26 +02:00
.sidebar-panel #search-box {
-moz-appearance: none !important;
background-color: rgba(249, 249, 250, 0.1) !important;
color: inherit !important;
}
2024-08-29 11:46:26 +02:00
/* Add sidebar divider and give it background */
#sidebar,
#sidebar-header {
background-color: inherit !important;
border-right: 1px solid var(--sidebar-border-color);
border-inline-width: 0px 1px;
}
#sidebar-box:not([positionend])> :-moz-locale-dir(rtl),
#sidebar-box[positionend]>* {
border-inline-width: 1px 0px;
}
/* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */
#sidebar-box:not([positionend]):hover~#appcontent #statuspanel {
inset-inline: auto 0px !important;
}
2024-08-29 11:46:26 +02:00
#sidebar-box:not([positionend]):hover~#appcontent #statuspanel-label {
margin-inline: 0px !important;
border-left-style: solid !important;
}
2024-08-29 11:46:26 +02:00
.browser-toolbar {
2024-08-29 11:46:26 +02:00
padding-left: var(--sidebar-width) !important;
position: relative !important;
}
#PersonalToolbar {
2024-08-29 11:46:26 +02:00
padding: 2px 5px !important;
padding-top: 0px !important;
margin-top: 0px !important;
padding-left: calc(var(--sidebar-width) + 6px) !important;
}
/*
2024-08-29 11:46:26 +02:00
Extensions ::
To enable/disable specific extensions just comment/uncomment the line below.
=========================================================================
*/
/*
2024-08-29 11:46:26 +02:00
Extension: Window Controls / Client Side Decorations (CSD)
Description: This brings the window controls into the main bar (where the address bar exists). Please see the prefs.css folder for switching the sides from left to right.
Repository URL: https://github.com/drannex42/FirefoxSidebar
Contributors: Mr-nUUb, Xanaxus, Drannex42
Issue URL: https://github.com/drannex42/FirefoxSidebar/issues/14
*/
/* allow the buttons to appear */
.browser-toolbar {
2024-08-29 11:46:26 +02:00
position: unset !important;
}
/* reserve space for buttons */
#nav-bar {
2024-08-29 11:46:26 +02:00
padding-right: var(--csd-margin-right) !important;
margin-left: var(--csd-margin-left) !important;
}
/* move buttons next to menu button */
.titlebar-buttonbox-container {
2024-08-29 11:46:26 +02:00
visibility: visible !important;
position: fixed !important;
display: block;
z-index: 999999999;
top: var(--csd-top, inherit);
right: var(--csd-right, inherit);
left: var(--csd-left, inherit);
max-width: var(--csd-width);
}
/* hide buttons in fullscreen mode (video player and F11) */
#main-window[inFullscreen="true"] .titlebar-buttonbox-container,
#main-window[inDOMFullscreen="true"] .titlebar-buttonbox-container {
2024-08-29 11:46:26 +02:00
visibility: hidden !important;
}
/* remove empty space when in fullscreen mode (F11) */
#main-window[inFullscreen="true"] #nav-bar {
2024-08-29 11:46:26 +02:00
padding-right: 0px !important;
margin-left: 0px !important;
}
2024-08-29 11:46:26 +02:00
/* END Client Side Decorations / Window Controls */
2024-08-29 11:46:26 +02:00
/*
Extension: Superbox Removal (and compaction)
Description: This removes the superbox and fixes some padding around the urlbar.
Repository URL: https://github.com/drannex42/FirefoxSidebar
*/
/* --- Prevent enlargement */
#urlbar[breakout-extend] {
2024-08-29 11:46:26 +02:00
/* top: calc( */
/* (var(--urlbar-toolbar-height) - var(--urlbar-height)) / 2 */
/* ) !important; */
/* Fix due to deprecation https://www.reddit.com/r/firefox/comments/1cs3g49/address_bar_suggestions_going_up_instead_of_down/ */
top: calc((var(--urlbar-container-height, --urlbar-toolbar-height) - var(--urlbar-height)) / 2) !important;
left: 0 !important;
width: 100% !important;
}
#urlbar[breakout-extend] #urlbar-input-container {
2024-08-29 11:46:26 +02:00
height: var(--urlbar-height) !important;
/* padding: 0px !important; */
padding-block: 0px !important;
padding-inline: 0px !important;
}
2024-08-29 11:46:26 +02:00
.urlbarView-row {
2024-08-29 11:46:26 +02:00
padding: 0px 2px 0px 2px;
}
2024-08-29 11:46:26 +02:00
/* END Prevent enlargement --- */
/*/* --- Reduce row paddings to make them more compact */
.urlbarView-row {
2024-08-29 11:46:26 +02:00
padding: 2px 0px !important;
line-height: 1.2em !important;
margin: -1px;
margin-bottom: 0px;
}
2024-08-29 11:46:26 +02:00
.urlbarView-row-inner {
2024-08-29 11:46:26 +02:00
padding-bottom: 6px !important;
}
2024-08-29 11:46:26 +02:00
.urlbarView {
2024-08-29 11:46:26 +02:00
margin: 0px !important;
width: 100% !important;
}
2024-08-29 11:46:26 +02:00
/* END Reduce row paddings to make them more compact --- */
/* Disable Urlbar Animation */
2024-08-29 11:46:26 +02:00
#urlbar[breakout][breakout-extend][breakout-extend-animate]>#urlbar-background {
animation-name: none !important;
animation: none !important;
}
2024-08-29 11:46:26 +02:00
/* END Disable Urlbar Animation */
/* --- More compact "Search with Google" rows */
2024-08-29 11:46:26 +02:00
.urlbarView-row[dynamicType="onboardTabToSearch"]>.urlbarView-row-inner {
min-height: auto !important;
width: auto !important;
}
2024-08-29 11:46:26 +02:00
.urlbarView-row[dynamicType="onboardTabToSearch"]>.urlbarView-row-inner>.urlbarView-no-wrap>.urlbarView-favicon {
margin-bottom: -1px;
}
2024-08-29 11:46:26 +02:00
/* END More compact "Search with Google" rows --- */
/* Remove active border on the addressbar when in focus */
#nav-bar {
2024-08-29 11:46:26 +02:00
--toolbar-field-focus-border-color: #ccc;
}
/* Remove box shadow on address bar */
#urlbar-background,
#searchbar {
2024-08-29 11:46:26 +02:00
box-shadow: none !important;
}
'';
2024-04-21 22:26:34 +02:00
bookmarks = [
{
name = "estrogen production";
tags = ["chemistry" "oestrogen" "estrogen" "diy"];
url = "https://crimethinc.com/2022/12/15/producing-transdermal-estrogen-a-do-it-yourself-guide";
}
{
name = "Nix sites";
toolbar = false;
bookmarks = [
{
name = "packages";
tags = ["packages" "basic" "nix"];
url = "https://search.nixos.org/";
}
{
name = "settings";
tags = ["settings" "services" "packages" "nix"];
url = "https://mynixos.com";
}
];
}
];
};
};
}