139 lines
4.7 KiB
Nix
139 lines
4.7 KiB
Nix
{pkgs, ...}: {
|
|
programs = {
|
|
chromium = {
|
|
enable = true;
|
|
package = pkgs.ungoogled-chromium;
|
|
commandLineArgs = ["--enable-features=TouchpadOverscrollHistoryNavigation"];
|
|
};
|
|
|
|
firefox = {
|
|
policies = {
|
|
enable = true;
|
|
ExtensionSettings = {
|
|
# Allow extensions to be installed from anywhere
|
|
"*" = {
|
|
"installation_mode" = "allowed";
|
|
};
|
|
|
|
# uBlock Origin
|
|
"uBlock0@raymondhill.net" = {
|
|
"installation_mode" = "force_installed";
|
|
"install_url" = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
|
};
|
|
|
|
# LocalCDN
|
|
"{b86e4813-687a-43e6-ab65-0bde4ab75758}" = {
|
|
"installation_mode" = "force_installed";
|
|
"install_url" = "https://addons.mozilla.org/firefox/downloads/latest/localcdn-fork-of-decentraleyes/latest.xpi";
|
|
};
|
|
|
|
# Sidebery
|
|
"{3c078156-979c-498b-8990-85f7987dd929}" = {
|
|
"installation_mode" = "force_installed";
|
|
"install_url" = "https://addons.mozilla.org/firefox/downloads/latest/sidebery/latest.xpi";
|
|
};
|
|
|
|
# User-Agent Switcher and Manager
|
|
"{a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7}" = {
|
|
"installation_mode" = "force_installed";
|
|
"install_url" = "https://addons.mozilla.org/firefox/downloads/latest/user-agent-switcher-and-manager/latest.xpi";
|
|
};
|
|
};
|
|
};
|
|
|
|
profiles.panotaka = {
|
|
settings = {
|
|
"widget.use-xdg-desktop-portal.file-picker" = 1;
|
|
};
|
|
userChrome = ''
|
|
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/hide_tabs_toolbar.css made available under Mozilla Public License v. 2.0
|
|
See the above repository for updates as well as full license text. */
|
|
|
|
/* Hides tabs toolbar */
|
|
/* For OSX use hide_tabs_toolbar_osx.css instead */
|
|
|
|
/* Note, if you have either native titlebar or menubar enabled, then you don't really need this style.
|
|
* In those cases you can just use: #TabsToolbar{ visibility: collapse !important }
|
|
*/
|
|
|
|
/* IMPORTANT */
|
|
/*
|
|
Get window_control_placeholder_support.css
|
|
Window controls will be all wrong without it
|
|
*/
|
|
|
|
:root[tabsintitlebar]{ --uc-toolbar-height: 40px; }
|
|
:root[tabsintitlebar][uidensity="compact"]{ --uc-toolbar-height: 32px }
|
|
#titlebar{
|
|
will-change: unset !important;
|
|
transition: none !important;
|
|
opacity: 1 !important;
|
|
}
|
|
#TabsToolbar{ visibility: collapse !important }
|
|
|
|
:root[sizemode="fullscreen"] #TabsToolbar > :is(#window-controls,.titlebar-buttonbox-container){
|
|
visibility: visible !important;
|
|
z-index: 2;
|
|
}
|
|
|
|
:root:not([inFullscreen]) #nav-bar{
|
|
margin-top: calc(0px - var(--uc-toolbar-height,0px));
|
|
}
|
|
|
|
:root[tabsintitlebar] #toolbar-menubar[autohide="true"]{
|
|
min-height: unset !important;
|
|
height: var(--uc-toolbar-height,0px) !important;
|
|
position: relative;
|
|
}
|
|
|
|
#toolbar-menubar[autohide="false"]{
|
|
margin-bottom: var(--uc-toolbar-height,0px)
|
|
}
|
|
|
|
:root[tabsintitlebar] #toolbar-menubar[autohide="true"] #main-menubar{
|
|
flex-grow: 1;
|
|
align-items: stretch;
|
|
background-color: var(--toolbar-bgcolor,--toolbar-non-lwt-bgcolor);
|
|
background-clip: padding-box;
|
|
border-right: 30px solid transparent;
|
|
border-image: linear-gradient(to left, transparent, var(--toolbar-bgcolor,--toolbar-non-lwt-bgcolor) 30px) 20 / 30px
|
|
}
|
|
|
|
#toolbar-menubar:not([inactive]){ z-index: 2 }
|
|
#toolbar-menubar[autohide="true"][inactive] > #menubar-items {
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
margin-left: var(--uc-window-drag-space-pre,0px)
|
|
}
|
|
|
|
'';
|
|
};
|
|
/*
|
|
# Wait for https://github.com/NixOS/nixpkgs/pull/269817 to be merged
|
|
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
|
nixExtensions = with config.nur.repos.rycee.firefox-addons; [
|
|
ublock-origin
|
|
localcdn
|
|
];
|
|
|
|
extraPolicies = {
|
|
CaptivePortal = false;
|
|
DisableFirefoxStudies = true;
|
|
DisablePocket = true;
|
|
DisableTelemetry = true;
|
|
DisableFirefoxAccounts = true;
|
|
FirefoxHome = {
|
|
Pocket = false;
|
|
Snippets = false;
|
|
};
|
|
UserMessaging = {
|
|
ExtensionRecommendations = false;
|
|
SkipOnboarding = true;
|
|
};
|
|
};
|
|
};
|
|
*/
|
|
};
|
|
};
|
|
}
|