nix-config/users/tacocat/programs/firefox.nix

436 lines
15 KiB
Nix
Raw Normal View History

2023-11-20 05:52:13 +00:00
{
pkgs,
theme,
...
}: {
2023-11-05 05:59:16 +00:00
programs.firefox = {
enable = true;
policies = {
DisableAppUpdate = true;
DisableFirefoxAccounts = false;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableTelemetry = true;
DontCheckDefaultBrowser = true;
EnableTrackingProtection = true;
NoDefaultBookmarks = true;
OfferToSaveLogins = false;
OfferToSaveLoginsDefault = false;
PasswordManagerEnabled = false;
FirefoxHome = {
Search = true;
Pocket = false;
Snippets = false;
TopSites = false;
Highlights = false;
};
UserMessaging = {
ExtensionRecommendations = false;
SkipOnboarding = true;
};
Cookies = {
ExpireAtSessionEnd = true;
RejectTracker = true;
};
SanitizeOnShutdown = {
Cache = true;
Cookies = true;
Downloads = true;
FormData = true;
SiteSettings = true;
History = false;
2023-11-12 06:06:24 +00:00
};
};
2023-11-05 05:59:16 +00:00
profiles = {
"aria" = {
2023-11-10 18:03:26 +00:00
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
2023-11-05 05:59:16 +00:00
ublock-origin
bitwarden
canvasblocker
aria2-integration
sponsorblock
xbrowsersync
2023-11-22 03:30:31 +00:00
sidebery
2023-11-05 05:59:16 +00:00
];
settings = {
"browser.aboutConfig.showWarning" = false;
"browser.startup.page" = 1;
"geo.provider.network.url" = "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%";
"intl.accept_languages" = "en-US, en";
"app.update.auto" = false;
"browser.download.useDownloadDir" = false;
"browser.download.manager.addToRecentDocs" = false;
"browser.urlbar.suggest.addons" = false;
"browser.urlbar.suggest.clipboard" = false;
"browser.urlbar.suggest.engines" = false;
"browser.urlbar.suggest.history" = false;
"browser.urlbar.suggest.pocket" = false;
"browser.urlbar.suggest.topsites" = false;
"browser.urlbar.suggest.searches" = false;
"browser.urlbar.suggest.trending" = false;
"browser.tabs.firefox-view" = false;
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
2023-11-22 03:30:31 +00:00
"browser.toolbars.bookmarks.visibility" = "never";
};
search = {
force = true;
2023-11-12 06:06:24 +00:00
default = "Celtic Lite";
engines = {
"Nix Packages" = {
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "type";
value = "packages";
}
2023-11-12 06:06:24 +00:00
{
name = "channel";
value = "unstable";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@np"];
};
"Celtic Lite" = {
urls = [
{
template = "https://search.celticlite.com/search";
params = [
{
2023-11-12 06:06:24 +00:00
name = "q";
value = "{searchTerms}";
}
];
}
];
definedAliases = ["@cl"];
};
"Google".metaData.hidden = true;
"Amazon.com".metaData.hidden = true;
"Bing".metaData.hidden = true;
"eBay".metaData.hidden = true;
};
};
userChrome = ''
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
* {
2023-11-22 03:30:31 +00:00
font-family: "Inter" !important;
font-size: 14px !important;
--arrowpanel-background: ${theme.base00} !important;
--arrowpanel-border-color: ${theme.base02} !important;
--autocomplete-popup-highlight-color: ${theme.base01} !important;
--autocomplete-popup-highlight-background: ${theme.base06} !important;
--toolbarbutton-active-background: ${theme.base06} !important;
--lwt-toolbarbutton-icon-fill-attention: var(--button-primary-bgcolor, ${theme.base06}) !important;
--toolbar-field-focus-border-color: ${theme.base06} !important;
}
.toolbar {
background-color: #11171D !important;
}
window,
#main-window,
#toolbar-menubar,
#TabsToolbar,
#PersonalToolbar,
#navigator-toolbox,
#sidebar-box {
background-color: ${theme.base02} !important;
-moz-appearance: none !important;
background-image: none !important;
border: none !important;
}
.tab-background[selected="true"] {
background-color: ${theme.base00} !important;
-moz-appearance: none !important;
background-image: none !important;
border: none !important;
}
.tab-background {
background-color: ${theme.base02} !important;
border-radius: 0px !important;
margin-block: 0px !important;
2023-11-22 03:30:31 +00:00
min-height: 0px !important;
}
.tabbrowser-tab:hover .tab-background {
background-color: ${theme.base09} !important;
}
.tabbrowser-tab[fadein] {
max-width: 100vw !important;
}
#urlbar {
background-color: #11171D !important;
border-radius: 10px !important;
}
#nav-bar {
background-color: ${theme.base02} !important;
-moz-appearance: none !important;
background-image: none !important;
border: none !important;
transition: margin 0.5s !important;
}
#TabsToolbar {
z-index: 1000 !important;
}
2023-11-22 03:30:31 +00:00
#firefox-view-button {
visibility: collapse;
}
#alltabs-button {
visibility: collapse;
}
hbox.titlebar-spacer:nth-child(3) {
visibility: collapse;
}
hbox.titlebar-buttonbox-container:nth-child(5) {
visibility: collapse;
}
#mainPopupSet menupopup,
menupopup:not(.in-menulist) > menuitem,
menupopup:not(.in-menulist) > menu {
border: 0 !important;
border-radius: 0px !important;
padding: 0px 0px 0px 0px !important;
}
.tabbrowser-tab {
height: 25px !important;
z-index: 1000 !important;
padding: none !important;
padding-inline: 0px !important;
}
/*
#navigator-toolbox:not(:focus-within):not(:hover) #nav-bar {
margin-top: -40px !important;
}
*/
.tab-line {
display: none !important;
}
.tab-icon-image:not([pinned]){
display: none !important;
}
#tab-content {
vertical-align: middle !important;
}
.tab-text,
.tab-label {
-moz-box-flex: 1 !important;
text-align: center !important;
}
.tab-secondary-label {
display:none !important;
}
.tab-label {
padding-top: 5px !important;
overflow: hidden !important;
}
.tabbrowser-tab .tab-label-container {
margin-inline-end: 7px !important;
}
.tab-label-container {
-moz-box-pack: center !important;
-moz-box-orient: horizontal !important;
display: grid !important;
justify-content: safe center !important;
}
#tabbrowser-tabs {
-moz-box-flex: 1 !important;
text-align: center !important;
2023-11-22 03:30:31 +00:00
border-inline-start: 0px !important;
padding-inline-start: 0px !important;
margin-inline-start: 0px !important;
}
#tabs-newtab-button{
display: none !important;
}
.tabbrowser-tab::before,
.tabbrowser-tab::after{
display: none !important;
}
.tab-close-button {
display: none !important;
border-radius: 10px !important;
}
#identity-box,
#tracking-protection-icon-container {
display: none !important;
}
#back-button>.toolbarbutton-icon {
transform: scale(.85, .85) !important;
animation: none !important;
border: none !important;
box-shadow: none !important;
}
#back-button:not(:hover),
#back-button:not(:hover) > .toolbarbutton-icon {
background: none !important;
}
#back-button:hover,
#back-button:hover > .toolbarbutton-icon {
border-radius: 2px !important;
}
#whats-new-menu-button,
#pocket-button,
#save-to-pocket-button
#pageActionSeparator,
#reader-mode-button {
display: none !important;
}
#star-button {
color: ${theme.base06} !important;
}
#save-to-pocket-button {
visibility: hidden !important;
}
#PanelUI-button {
border-image-slice: 0 !important;
}
#urlbar-input {
background-color: ${theme.base00} !important;
padding-left: 5px !important;
}
#urlbar-results {
background-color: ${theme.base00} !important;
border-radius: 5px !important;
}
#urlbar-results .urlbarView-row:hover{
color: ${theme.base06} !important;
border-radius: 5px !important;
}
.urlbarView-row[selected] .urlbarView-row-inner {
border-radius: 5px !important;
background-color: ${theme.base06} !important;
color: ${theme.base00} !important;
}
.urlbarView-body-inner {
border-top: none !important;
}
#nav-bar {
border-bottom: 0px !important;
box-shadow: none !important;
}
#urlbar ::-moz-selection,
.searchbar-textbox ::-moz-selection {
background-color: ${theme.base01} !important;
color: ${theme.base09} !important;
}
#tabbrowser-tabpanels {
background-color: ${theme.base01} !important;
}
urlbar > #urlbar-background {
background-color: ${theme.base00} !important;
}
#urlbar-background {
background-color: ${theme.base00} !important;
color: ${theme.base02} !important;
border: 1px solid ${theme.base06} !important;
}
#urlbar-background:not([focused]) {
background-color: ${theme.base00} !important;
color: ${theme.base02} !important;
}
#urlbar-one-offs-header-label{
display: none;
}
.search-one-offs > .search-panel-one-offs-header::before{
display: block;
content: "Search With:";
padding-inline: var(--urlbarView-item-inline-padding) 18px;
opacity: 0.6;
}
2023-11-22 03:30:31 +00:00
:root:not([privatebrowsingmode], [firefoxviewhidden]) :is(toolbarbutton, toolbarpaletteitem) + #tabbrowser-tabs,
:root[privatebrowsingmode]:not([firefoxviewhidden]) :is(
toolbarbutton:not(#firefox-view-button),
toolbarpaletteitem:not(#wrapper-firefox-view-button)
) + #tabbrowser-tabs {
border-inline-start: 0px !important;
padding-inline-start: 0px !important;
margin-inline-start: 0px !important;
}
.tab-icon-stack {
display: none;
}
.tab-label {
white-space: nowrap;
line-height: 2 !important; /* override 'normal' in case of fallback math fonts with huge metrics */
}
'';
userContent = ''
@namespace url("http://www.w3.org/1999/xhtml");
:root {
scrollbar-color: ${theme.base00} ${theme.base02};
}
* {
scrollbar-width: thin;
}
@-moz-document url-prefix("about:") {
:root {
--in-content-page-background: ${theme.base00} !important;
--toolbar-field-focus-border-color: ${theme.base06} !important;
--toolbarbutton-active-background: ${theme.base06} !important;
}
}
@-moz-document url("about:newtab"), url("about:home") {
* {
2023-11-22 03:30:31 +00:00
font-family: "Inter" !important;
}
body {
background-color: ${theme.base00} !important;
}
.logo-and-wordmark {
display: none !important;
}
.SnippetBaseContainer {
display: none !important;
}
.search-handoff-button {
border-radius: 15px !important;
border-width: 4px !important;
border-color: ${theme.base02} !important;
background-size: 0px !important;
background-color: ${theme.base00} !important;
padding-inline-start: 10px !important;
padding-inline-end: 10px !important;
}
.icon-settings {
display: none !important;
}
.fake-textbox {
text-align: center !important;
}
.search-wrapper input {
background-color: ${theme.base09} !important;
border-radius: 0px !important;
background-image: none !important;
background-size: none !important;
text-align: center !important;
font-size: 17px !important;
padding-inline-start: 10px !important;
padding-inline-end: 10px !important;
}
.search-wrapper input:focus {
text-align: left !important;
}
.body-wrapper {
display: none !important;
}
}
'';
2023-11-05 05:59:16 +00:00
};
};
};
# home.file."theme" = {
# source = "${inputs.firefox-rose}/dist";
# target = ".mozilla/firefox/aria/chrome";
# recursive = true;
# };
2023-11-05 05:59:16 +00:00
}