summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.lock23
-rw-r--r--flake.nix5
-rw-r--r--home-manager/features/gui/apps/librewolf.nix38
-rw-r--r--home-manager/features/gui/apps/librewolf/librewolf.nix95
-rw-r--r--home-manager/features/gui/apps/librewolf/theme/userChrome.css350
-rw-r--r--home-manager/features/gui/apps/librewolf/theme/userContent.css23
6 files changed, 496 insertions, 38 deletions
diff --git a/flake.lock b/flake.lock
index aa42369..281fc13 100644
--- a/flake.lock
+++ b/flake.lock
@@ -43,6 +43,28 @@
"type": "github"
}
},
+ "firefox-addons": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "dir": "pkgs/firefox-addons",
+ "lastModified": 1769141021,
+ "narHash": "sha256-HHAeQ1YMo0/gM38gBXulMk7xSPrsiw/7e6UpcmcxcfM=",
+ "owner": "rycee",
+ "repo": "nur-expressions",
+ "rev": "91b470d0ce83a8d84dc46e0bcbeb2a7836c06cd6",
+ "type": "gitlab"
+ },
+ "original": {
+ "dir": "pkgs/firefox-addons",
+ "owner": "rycee",
+ "repo": "nur-expressions",
+ "type": "gitlab"
+ }
+ },
"flake-compat": {
"flake": false,
"locked": {
@@ -471,6 +493,7 @@
"root": {
"inputs": {
"agenix": "agenix",
+ "firefox-addons": "firefox-addons",
"home-manager": "home-manager_2",
"hytale-launcher": "hytale-launcher",
"jovian": "jovian",
diff --git a/flake.nix b/flake.nix
index f8564f3..0ceee8a 100644
--- a/flake.nix
+++ b/flake.nix
@@ -53,5 +53,10 @@
nix-flatpak.url = "github:gmodena/nix-flatpak";
hytale-launcher.url = "github:JPyke3/hytale-launcher-nix";
+
+ firefox-addons = {
+ url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
};
}
diff --git a/home-manager/features/gui/apps/librewolf.nix b/home-manager/features/gui/apps/librewolf.nix
deleted file mode 100644
index 9bc0c05..0000000
--- a/home-manager/features/gui/apps/librewolf.nix
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- config,
- pkgs,
- lib,
- ...
-}: let
- cfg = config.features.gui.apps.librewolf;
-in {
- options.features.gui.apps.librewolf.enable = lib.mkEnableOption "librewolf";
- config = lib.mkIf cfg.enable {
- programs.librewolf = {
- enable = true;
- settings = {
- "browser.tabs.inTitlebar" = 0;
- };
- # profiles."lucas" = {
- # search = {
- # force = true;
- # default = "DuckDuckGo";
- # # engines = {
- # # "Nix Packages" = {
- # # urls = [{
- # # template = "https://search.nixos.org/packages";
- # # params = [
- # # { name = "type"; value = "packages"; }
- # # { name = "channel"; value = "unstable"; }
- # # { name = "query"; value = "{searchTerms}"; }
- # # ];
- # # }];
- # # icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
- # # definedAliases = [ "@n" ];
- # # };
- # # };
- # };
- # };
- };
- };
-}
diff --git a/home-manager/features/gui/apps/librewolf/librewolf.nix b/home-manager/features/gui/apps/librewolf/librewolf.nix
new file mode 100644
index 0000000..210cf49
--- /dev/null
+++ b/home-manager/features/gui/apps/librewolf/librewolf.nix
@@ -0,0 +1,95 @@
+{
+ config,
+ pkgs,
+ lib,
+ inputs,
+ ...
+}: let
+ cfg = config.features.gui.apps.librewolf;
+in {
+ # After enabling this feature, make sure to enable the extensions in the menu button and give them private browsing access. Also make sure to enable dark theme and log into firefox sync account.
+
+ options.features.gui.apps.librewolf.enable = lib.mkEnableOption "librewolf";
+ config = lib.mkIf cfg.enable {
+ programs.librewolf = {
+ enable = true;
+ policies = {
+ # Copied from librewolf policies but don't remove google.
+ SearchEngines.Remove = [
+ "Bing"
+ "Amazon.com"
+ "eBay"
+ "Twitter"
+ "Perplexity"
+ ];
+ };
+ settings = {
+ # UI Customizations
+ "browser.tabs.inTitlebar" = 0; # Use system window bar.
+ "browser.uiCustomization.state" = ''{"placements":{"widget-overflow-fixed-list":["privatebrowsing-button","bookmarks-menu-button","logins-button","print-button"],"unified-extensions-area":[],"nav-bar":["back-button","stop-reload-button","forward-button","vertical-spacer","urlbar-container","downloads-button","fxa-toolbar-menu-button","unified-extensions-button","ublock0_raymondhill_net-browser-action"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","firefox-view-button","alltabs-button"],"vertical-tabs":[],"PersonalToolbar":["personal-bookmarks"]},"seen":["developer-button","screenshot-button","ublock0_raymondhill_net-browser-action"],"dirtyAreaCache":["nav-bar","vertical-tabs","toolbar-menubar","TabsToolbar","PersonalToolbar","widget-overflow-fixed-list"],"currentVersion":23,"newElementCount":4}''; # Organize toolbar.
+
+ # Themeing Options
+
+ # User Chrome and Content
+ "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
+
+ # Required by simplefox theme
+ "layers.acceleration.force-enabled" = true;
+ "gfx.webrender.all" = true;
+ "svg.context-properties.content.enabled" = true;
+
+ # Don't automatically disable sideloaded extensions.
+ "extensions.autoDisableScopes" = 0;
+
+ # Passwords
+ "signon.rememberSignons" = true;
+ "signon.autofillForms" = true;
+
+ # Sync
+ "identity.fxaccounts.enabled" = true;
+ "identity.fxaccounts.account.device.name" = config.home.username;
+
+ "services.sync.username" = "lucaschapple@posteo.com";
+
+ "services.sync.engine.bookmarks" = true;
+ "services.sync.engine.history" = true;
+ "services.sync.engine.tabs" = false;
+ "services.sync.engine.passwords" = true;
+ "services.sync.engine.addresses" = true;
+ "services.sync.engine.creditcards" = true;
+ "services.sync.engine.addons" = false;
+ "services.sync.engine.prefs" = false;
+
+ # Enable WebGL
+ "webgl.disabled" = false;
+ };
+ profiles."default" = {
+ isDefault = true;
+ # userChrome = builtins.readFile ./theme/userChrome.css;
+ # userContent = builtins.readFile ./theme/userContent.css;
+ search = {
+ force = true;
+ default = "ddg";
+ # default = "g";
+ engines = {
+ nix-search = {
+ name = "Nix Search";
+ urls = [{ template = "https://mynixos.com/search?q={searchTerms}"; }];
+ icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
+ definedAliases = [ "@n" ];
+ };
+ };
+ };
+ extensions = {
+ force = true;
+ packages = with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [
+ youtube-shorts-block
+ sponsorblock
+ tab-stash
+ vimium-c
+ ];
+ };
+ };
+ };
+ };
+}
diff --git a/home-manager/features/gui/apps/librewolf/theme/userChrome.css b/home-manager/features/gui/apps/librewolf/theme/userChrome.css
new file mode 100644
index 0000000..4be1191
--- /dev/null
+++ b/home-manager/features/gui/apps/librewolf/theme/userChrome.css
@@ -0,0 +1,350 @@
+ :root {
+
+ /* Minimal Functional Fox variables*/
+ --mff-bg: #292f36;
+ --mff-icon-color: #e0fbfc;
+ --mff-nav-toolbar-padding: 8px;
+ --mff-sidebar-bg: var(--mff-bg);
+ --mff-sidebar-color: #e0fbfc;
+ --mff-tab-border-radius: 0px;
+ --mff-tab-color: #fefefa;
+ --mff-tab-font-family: "Cantarell", sans;
+ --mff-tab-font-size: 11pt;
+ --mff-tab-font-weight: 400;
+ --mff-tab-height: 32px;
+ --mff-tab-pinned-bg: #70c1b3;
+ --mff-tab-selected-bg: #ee6c4d;
+ --mff-tab-soundplaying-bg: #9c89b8;
+ --mff-urlbar-color: #98c1d9;
+ --mff-urlbar-focused-color: #e0fbfc;
+ --mff-urlbar-font-family: "Cantarell", serif;
+ --mff-urlbar-font-size: 12pt;
+ --mff-urlbar-font-weight: 700;
+ --mff-urlbar-results-color: #e0fbfc;
+ --mff-urlbar-results-font-family: "mononoki Nerd Font", serif;
+ --mff-urlbar-results-font-size: 12pt;
+ --mff-urlbar-results-font-weight: 700;
+ --mff-urlbar-results-url-color: #98c1d9;
+ /* --mff-tab-selected-bg: linear-gradient(90deg, rgba(232,74,95,1) 0%, rgba(255,132,124,1) 50%, rgba(254,206,168,1) 100%); */
+ /* --mff-urlbar-font-weight: 600; */
+
+ /* Overriden Firefox variables*/
+ --autocomplete-popup-background: var(--mff-bg) !important;
+ --default-arrowpanel-background: var(--mff-bg) !important;
+ --default-arrowpanel-color: #fefefa !important;
+ --lwt-toolbarbutton-icon-fill: var(--mff-icon-color) !important;
+ --panel-disabled-color: #f9f9fa80;
+ --toolbar-bgcolor: var(--mff-bg) !important;
+ --urlbar-separator-color: transparent !important;
+}
+
+/*
+ _____ _ ___ ___
+ |_ _/_\ | _ ) __|
+ | |/ _ \| _ \__ \
+ |_/_/ \_\___/___/
+
+*/
+
+.tab-background[selected="true"] {
+ background: var(--mff-tab-selected-bg) !important;
+}
+
+.tab-background:not[visuallyselected] {
+ background: var(--mff-tab-selected-bg) !important;
+ opacity: 0.5 !important;
+}
+
+/* This positions the tabs under the navaigator container */
+#titlebar {
+ -moz-box-ordinal-group: 3 !important;
+}
+
+.tabbrowser-tab::after,
+.tabbrowser-tab::before {
+ border-left: none !important;
+}
+
+.tab-background {
+ border: none !important;
+}
+
+.tabbrowser-arrowscrollbox {
+ margin-inline-start: 4px !important;
+ margin-inline-end: 0px !important;
+}
+
+.tab-close-button {
+ display: none !important;
+}
+
+.tab-text {
+ font-family: var(--mff-tab-font-family);
+ font-weight: var(--mff-tab-font-weight);
+ font-size: var(--mff-tab-font-size) !important;
+ color: var(--mff-tab-color);
+}
+
+/* Hide the favicon for tabs */
+hbox.tab-content .tab-icon-image {
+ display: none !important;
+}
+
+/* Show the favicon for tabs that are pinned */
+hbox.tab-content[pinned=true] .tab-icon-image {
+ display: initial !important;
+}
+
+hbox.tab-content[pinned=true] .tab-text {
+ display: none !important;
+}
+
+#tabbrowser-tabs {
+ --tab-loading-fill: #033433 !important;
+
+}
+
+.tab-label-container:not([textoverflow]) {
+ display: flex;
+ overflow: hidden;
+ justify-content: center;
+width: 50% !important;
+ max-width: 50% !important;
+ min-width: 50% !important;
+}
+
+/* .tab-label-container::after {
+ content: "?" !important;
+
+} */
+
+.tab-line {
+ display: none !important;
+}
+
+.tabbrowser-tab {
+ border-radius: var(--mff-tab-border-radius) !important;
+ border-width: 0;
+ height: var(--mff-tab-height) !important;
+ margin-bottom: 4px !important;
+ margin-inline-end: 4px !important;
+ margin-top: 4px !important;
+ max-height: var(--mff-tab-height) !important;
+ min-height: var(--mff-tab-height) !important;
+}
+
+.tabbrowser-tab[soundplaying="true"] {
+ background-color: var(--mff-tab-soundplaying-bg) !important;
+}
+
+#tabs-newtab-button {
+ list-style-image: url("add.svg") !important;
+ opacity: 0.7;
+}
+
+.tab-icon-sound {
+ display: none !important;
+}
+
+/*
+ _____ ___ ___ _ ___ _ ___
+|_ _/ _ \ / _ \| | | _ ) /_\ | _ \
+ | || (_) | (_) | |__| _ \/ _ \| /
+ |_| \___/ \___/|____|___/_/ \_\_|_\
+*/
+
+.urlbar-icon > image {
+ fill: var(--mff-icon-color) !important;
+ color: var(--mff-icon-color) !important;
+}
+
+.toolbarbutton-text {
+ color: var(--mff-icon-color) !important;
+}
+.urlbar-icon {
+ color: var(--mff-icon-color) !important;
+
+}
+
+.toolbarbutton-icon {
+/* filter: drop-shadow(0 0 0.75rem crimson); */
+}
+
+#urlbar-results {
+ font-family: var(--mff-urlbar-results-font-family);
+ font-weight: var(--mff-urlbar-results-font-weight);
+ font-size: var(--mff-urlbar-results-font-size) !important;
+ color: var(--mff-urlbar-results-color) !important;
+}
+
+.urlbarView-row[type="bookmark"] > span{
+ color: green !important;
+}
+
+.urlbarView-row[type="switchtab"] > span{
+ color: orange !important;
+}
+
+.urlbarView-url, .search-panel-one-offs-container {
+ color: var(--mff-urlbar-results-url-color) !important;
+ font-family: var(--mff-urlbar-font-family);
+ font-weight: var(--mff-urlbar-results-font-weight);
+ font-size: var(--mff-urlbar-font-size) !important;
+}
+
+.urlbarView-favicon, .urlbarView-type-icon {
+ display: none !important;
+}
+
+#urlbar-input {
+ font-size: var(--mff-urlbar-font-size) !important;
+ color: var(--mff-urlbar-color) !important;
+ font-family: var(--mff-urlbar-font-family) !important;
+ font-weight: var(--mff-urlbar-font-weight)!important;
+ text-align: center !important;
+}
+
+#tracking-protection-icon-container, #identity-box {
+ display: none;
+}
+
+#back-button > .toolbarbutton-icon{
+ --backbutton-background: transparent !important;
+ border: none !important;
+}
+
+#back-button {
+ list-style-image: url("left-arrow.svg") !important;
+}
+
+#forward-button {
+ list-style-image: url("right-arrow.svg") !important;
+}
+
+toolbar {
+ background-image: none !important;
+}
+
+#urlbar-background {
+ opacity: .98 !important;
+}
+
+#navigator-toolbox, toolbaritem {
+ border: none !important;
+}
+
+#urlbar-background {
+ background-color: var(--mff-bg) !important;
+ border: none !important;
+}
+
+.toolbar-items {
+ background-color: var(--mff-bg) !important;
+}
+
+#sidebar-search-container {
+ background-color: var(--mff-sidebar-bg) !important;
+}
+
+box.panel-arrowbox {
+ display: none;
+}
+
+box.panel-arrowcontent {
+ border-radius: 8px !important;
+ border: none !important;
+}
+
+tab.tabbrowser-tab {
+ overflow: hidden;
+}
+
+tab.tabbrowser-tab:hover {
+ box-shadow: 0 1px 4px rgba(0,0,0,.05);
+}
+
+image#star-button {
+ display: none;
+}
+
+toolbar#nav-bar {
+ padding: var(--mff-nav-toolbar-padding) !important;
+}
+
+toolbar#nav-bar {
+ padding: 4px !important;
+}
+
+#urlbar {
+ max-width: 70% !important;
+ margin: 0 15% !important;
+ /* position: unset!important; */;
+}
+
+#urlbar-input:focus {
+ color: var(--mff-urlbar-focused-color) !important;
+}
+
+
+.megabar[breakout-extend="true"]:not([open="true"]) > #urlbar-background {
+ box-shadow: none !important;
+ background-color: transparent !important;
+}
+
+toolbarbutton {
+ box-shadow: none !important;
+}
+
+
+/*
+ ___ ___ ___ ___ ___ _ ___
+ / __|_ _| \| __| _ ) /_\ | _ \
+ \__ \| || |) | _|| _ \/ _ \| /
+ |___/___|___/|___|___/_/ \_\_|_\
+*/
+
+.close-icon, .urlbar-icon {
+ fill: var(--mff-icon-color) !important;
+}
+
+.sidebar-placesTree {
+ color: var(--mff-sidebar-color) !important;
+}
+
+#sidebar-switcher-target {
+/* color: white !important; */
+}
+
+#sidebar-box {
+ --sidebar-background-color: var(--mff-sidebar-bg) !important;
+}
+
+splitter#sidebar-splitter {
+ opacity: 0 !important;
+}
+
+splitter#sidebar-splitter {
+ border: none !important;
+ background-color: transparent !important;
+}
+
+image#sidebar-icon {
+ display: none;
+}
+
+
+/*
+ _ ___ ___ _____ _____ _ _ _ ___ _
+ /_\ | _ \ _ \/ _ \ \ / / _ \/_\ | \| | __| |
+ / _ \| / / (_) \ \/\/ /| _/ _ \| .` | _|| |__
+ /_/ \_\_|_\_|_\\___/ \_/\_/ |_|/_/ \_\_|\_|___|____|
+ */
+
+.panel-arrowcontent {
+ padding: 0px !important;
+ margin: 0px !important;
+}
+
+toolbarseparator {
+ display: none;
+}
diff --git a/home-manager/features/gui/apps/librewolf/theme/userContent.css b/home-manager/features/gui/apps/librewolf/theme/userContent.css
new file mode 100644
index 0000000..27df186
--- /dev/null
+++ b/home-manager/features/gui/apps/librewolf/theme/userContent.css
@@ -0,0 +1,23 @@
+@import url("userChrome.css");
+
+/* Removes white loading page */
+@-moz-document url(about:blank), url(about:newtab), url(about:home) {
+ html:not(#ublock0-epicker), html:not(#ublock0-epicker) body, #newtab-customize-overlay {
+ background: var(--mff-bg) !important;
+ }
+ }
+
+
+ /* Hide scrollbar */
+
+ :root{
+ scrollbar-width: none !important;
+ }
+
+
+ @-moz-document url(about:privatebrowsing) {
+
+ :root{
+ scrollbar-width: none !important;
+ }
+ }