Compare commits
5 Commits
15ea443308
...
60c364dd22
Author | SHA1 | Date | |
---|---|---|---|
60c364dd22 | |||
8a74d36bd7 | |||
9031dfb62d | |||
7539947bb0 | |||
acc9c123df |
13
.gitea/workflows/update-flake-lock.yaml
Normal file
13
.gitea/workflows/update-flake-lock.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
name: update-flake-lock
|
||||
on:
|
||||
workflow_dispatch: # allows manual triggering
|
||||
schedule:
|
||||
- cron: '0 0 * * 0' # runs weekly on Sunday at 00:00
|
||||
|
||||
jobs:
|
||||
lockfile:
|
||||
runs-on: nix
|
||||
steps:
|
||||
- run: echo ${{gitea}}
|
||||
- run: echo ${{env}}
|
||||
|
110
home-modules/firefox/default.nix
Normal file
110
home-modules/firefox/default.nix
Normal file
@ -0,0 +1,110 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOption mkEnableOption mkPackageOption types;
|
||||
|
||||
defaultExtensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
bitwarden
|
||||
darkreader
|
||||
i-dont-care-about-cookies
|
||||
privacy-badger
|
||||
ublock-origin
|
||||
];
|
||||
|
||||
defaultSettings = {
|
||||
"app.normandy.first_run" = false;
|
||||
"app.shield.optoutstudies.enabled" = false;
|
||||
|
||||
# disable updates (pretty pointless with nix)
|
||||
"app.update.channel" = "default";
|
||||
|
||||
"browser.contentblocking.category" = "standard"; # "strict"
|
||||
"browser.ctrlTab.recentlyUsedOrder" = false;
|
||||
|
||||
"browser.download.viewableInternally.typeWasRegistered.svg" = true;
|
||||
"browser.download.viewableInternally.typeWasRegistered.webp" = true;
|
||||
"browser.download.viewableInternally.typeWasRegistered.xml" = true;
|
||||
|
||||
"browser.search.region" = "DE";
|
||||
|
||||
"browser.shell.checkDefaultBrowser" = false;
|
||||
"browser.tabs.loadInBackground" = true;
|
||||
"browser.urlbar.placeholderName" = "EnteEnteLauf";
|
||||
"browser.urlbar.showSearchSuggestionsFirst" = false;
|
||||
|
||||
# disable all the annoying quick actions
|
||||
"browser.urlbar.quickactions.enabled" = false;
|
||||
"browser.urlbar.quickactions.showPrefs" = false;
|
||||
"browser.urlbar.shortcuts.quickactions" = false;
|
||||
"browser.urlbar.suggest.quickactions" = false;
|
||||
|
||||
"distribution.searchplugins.defaultLocale" = "en-US";
|
||||
|
||||
"doh-rollout.balrog-migration-done" = true;
|
||||
"doh-rollout.doneFirstRun" = true;
|
||||
|
||||
"general.useragent.locale" = "en-US";
|
||||
|
||||
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
|
||||
|
||||
"extensions.extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
|
||||
"extensions.update.enabled" = false;
|
||||
"extensions.webcompat.enable_picture_in_picture_overrides" = true;
|
||||
"extensions.webcompat.enable_shims" = true;
|
||||
"extensions.webcompat.perform_injections" = true;
|
||||
"extensions.webcompat.perform_ua_overrides" = true;
|
||||
|
||||
"privacy.donottrackheader.enabled" = true;
|
||||
"browser.translations.enable" = false;
|
||||
|
||||
# Yubikey
|
||||
"security.webauth.u2f" = true;
|
||||
"security.webauth.webauthn" = true;
|
||||
"security.webauth.webauthn_enable_softtoken" = false;
|
||||
"security.webauth.webauthn_enable_usbtoken" = true;
|
||||
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"layout.word_select.stop_at_punctuation" = false;
|
||||
};
|
||||
|
||||
cfg = config.personal.firefox;
|
||||
in {
|
||||
options.personal.firefox = {
|
||||
enable = mkEnableOption "Apply personal firefox defaults.";
|
||||
package = mkPackageOption pkgs "firefox-bin" {};
|
||||
|
||||
extensions = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = defaultExtensions;
|
||||
description = "Firefox extensions to install.";
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
type = types.attrsOf ((pkgs.formats.json {}).type
|
||||
// {
|
||||
description = "Preferences (int, bool, string, and also attrs, list, float as a JSON string)";
|
||||
});
|
||||
default = defaultSettings;
|
||||
description = "Attribute set of preferences.";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
programs.firefox = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
package = cfg.package;
|
||||
|
||||
profiles = {
|
||||
default = {
|
||||
isDefault = true;
|
||||
id = 0;
|
||||
userChrome = builtins.readFile ./userChrome.css;
|
||||
inherit (cfg) extensions settings;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
76
home-modules/firefox/userChrome.css
Normal file
76
home-modules/firefox/userChrome.css
Normal file
@ -0,0 +1,76 @@
|
||||
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/toolbars_below_content_v2.css made available under Mozilla Public License v. 2.0
|
||||
See the above repository for updates as well as full license text. */
|
||||
|
||||
/* This requires Firefox 133
|
||||
* By default tabs will be the top-most toolbar, but you can set the following pref to move them to bottom:
|
||||
* userchrome.toolbars-below-content.tabs-at-bottom.enabled
|
||||
*/
|
||||
|
||||
#navigator-toolbox{
|
||||
display: contents;
|
||||
--uc-navbar-height: 40px;
|
||||
}
|
||||
:root[uidensity="compact"] #navigator-toolbox{
|
||||
--uc-navbar-height: 34px;
|
||||
}
|
||||
#main-window > body > #browser,
|
||||
.global-notificationbox,
|
||||
#tab-notification-deck,
|
||||
#toolbar-menubar{
|
||||
order: -1;
|
||||
}
|
||||
|
||||
#TabsToolbar{
|
||||
max-height: calc((var(--tab-min-height) + 2 * var(--tab-block-margin,0px)) * var(--multirow-n-rows,1));
|
||||
}
|
||||
#toolbar-menubar,
|
||||
#TabsToolbar{
|
||||
background: inherit !important;
|
||||
}
|
||||
@media (-moz-platform: linux){
|
||||
:root[sizemode="normal"][customtitlebar] #toolbar-menubar{
|
||||
border-top-left-radius: inherit;
|
||||
border-top-right-radius: inherit;
|
||||
}
|
||||
#toolbar-menubar,
|
||||
#TabsToolbar{
|
||||
opacity: 1 !important;
|
||||
will-change: unset !important;
|
||||
}
|
||||
#notification-popup[side="top"]{
|
||||
margin-top: calc(-2 * var(--panel-padding-block) - 40px - 32px - 8.5em) !important;
|
||||
}
|
||||
#permission-popup[side="top"]{
|
||||
margin-top: calc(-2 * var(--panel-padding-block) - 2.5em);
|
||||
}
|
||||
}
|
||||
|
||||
#nav-bar,
|
||||
#PersonalToolbar{
|
||||
background-image: linear-gradient(var(--toolbar-bgcolor),var(--toolbar-bgcolor)), var(--lwt-additional-images,var(--toolbar-bgimage)) !important;
|
||||
background-position: top,var(--lwt-background-alignment);
|
||||
background-position-y: calc(0px - var(--tab-min-height) - 2*var(--tab-block-margin,0px));
|
||||
background-repeat: repeat,var(--lwt-background-tiling);
|
||||
}
|
||||
:root[lwtheme-image] #nav-bar,
|
||||
:root[lwtheme-image] #PersonalToolbar{
|
||||
background-image: linear-gradient(var(--toolbar-bgcolor),var(--toolbar-bgcolor)),var(--lwt-header-image), var(--lwt-additional-images,var(--toolbar-bgimage)) !important;
|
||||
}
|
||||
#PersonalToolbar{
|
||||
background-position-y: calc(0px - var(--tab-min-height) - 2*var(--tab-block-margin,0px) - var( --uc-navbar-height));
|
||||
}
|
||||
#urlbar[breakout][breakout-extend]{
|
||||
display: flex !important;
|
||||
flex-direction: column-reverse !important;
|
||||
transform: translateY(calc(var(--urlbar-container-height) - 100%));
|
||||
}
|
||||
#urlbar[breakout-extend]:not([usertyping]) > .urlbar-input-container::after{
|
||||
display: flex;
|
||||
content: "";
|
||||
height: calc(var(--urlbar-min-height) - 2px - 2 * var(--urlbar-container-padding));
|
||||
}
|
||||
.urlbarView-body-inner{ border-top-style: none !important; }
|
||||
|
||||
#TabsToolbar{
|
||||
order: 3
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
{...}: {
|
||||
imports = [
|
||||
./firefox
|
||||
./firefox-webapp.nix
|
||||
];
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
}: let
|
||||
pkgs = import nixpkgs rec {
|
||||
system = "x86_64-linux";
|
||||
overlays = [(final: prev: {nixvim = nixvim.packages.${system}.default;})];
|
||||
overlays = [(final: prev: {nixvim = nixvim.packages.${system}.default;}) nurpkgs.overlays.default];
|
||||
};
|
||||
|
||||
nur = import nurpkgs {
|
||||
@ -33,12 +33,8 @@ in {
|
||||
framework = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
extraSpecialArgs = {
|
||||
ff-addons = nur.repos.rycee.firefox-addons;
|
||||
};
|
||||
|
||||
modules = [
|
||||
# ../home-modules/modules-list.nix
|
||||
../home-modules/modules-list.nix
|
||||
./framework
|
||||
];
|
||||
};
|
||||
|
@ -1,92 +1,5 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
stdenv,
|
||||
specialArgs,
|
||||
...
|
||||
}: let
|
||||
extensions = with specialArgs.ff-addons; [
|
||||
bitwarden
|
||||
darkreader
|
||||
i-dont-care-about-cookies
|
||||
privacy-badger
|
||||
ublock-origin
|
||||
tree-style-tab
|
||||
# tridactyl
|
||||
];
|
||||
|
||||
customChrome = builtins.readFile ./userChrome.css;
|
||||
|
||||
userChrome = customChrome;
|
||||
|
||||
# ~/.mozilla/firefox/PROFILE_NAME/prefs.js | user.js
|
||||
settings = {
|
||||
"app.normandy.first_run" = false;
|
||||
"app.shield.optoutstudies.enabled" = false;
|
||||
|
||||
# disable updates (pretty pointless with nix)
|
||||
"app.update.channel" = "default";
|
||||
|
||||
"browser.contentblocking.category" = "standard"; # "strict"
|
||||
"browser.ctrlTab.recentlyUsedOrder" = false;
|
||||
|
||||
"browser.download.viewableInternally.typeWasRegistered.svg" = true;
|
||||
"browser.download.viewableInternally.typeWasRegistered.webp" = true;
|
||||
"browser.download.viewableInternally.typeWasRegistered.xml" = true;
|
||||
|
||||
"browser.search.region" = "DE";
|
||||
|
||||
"browser.shell.checkDefaultBrowser" = false;
|
||||
"browser.tabs.loadInBackground" = true;
|
||||
"browser.urlbar.placeholderName" = "EnteEnteLauf";
|
||||
"browser.urlbar.showSearchSuggestionsFirst" = false;
|
||||
|
||||
# disable all the annoying quick actions
|
||||
"browser.urlbar.quickactions.enabled" = false;
|
||||
"browser.urlbar.quickactions.showPrefs" = false;
|
||||
"browser.urlbar.shortcuts.quickactions" = false;
|
||||
"browser.urlbar.suggest.quickactions" = false;
|
||||
|
||||
"distribution.searchplugins.defaultLocale" = "en-US";
|
||||
|
||||
"doh-rollout.balrog-migration-done" = true;
|
||||
"doh-rollout.doneFirstRun" = true;
|
||||
|
||||
"general.useragent.locale" = "en-US";
|
||||
|
||||
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
|
||||
|
||||
"extensions.extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
|
||||
"extensions.update.enabled" = false;
|
||||
"extensions.webcompat.enable_picture_in_picture_overrides" = true;
|
||||
"extensions.webcompat.enable_shims" = true;
|
||||
"extensions.webcompat.perform_injections" = true;
|
||||
"extensions.webcompat.perform_ua_overrides" = true;
|
||||
|
||||
"privacy.donottrackheader.enabled" = true;
|
||||
"browser.translations.enable" = false;
|
||||
|
||||
# Yubikey
|
||||
"security.webauth.u2f" = true;
|
||||
"security.webauth.webauthn" = true;
|
||||
"security.webauth.webauthn_enable_softtoken" = false;
|
||||
"security.webauth.webauthn_enable_usbtoken" = true;
|
||||
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"layout.word_select.stop_at_punctuation" = false;
|
||||
};
|
||||
in {
|
||||
programs.firefox = {
|
||||
{...}: {
|
||||
personal.firefox = {
|
||||
enable = true;
|
||||
|
||||
package = pkgs.firefox-bin;
|
||||
|
||||
profiles = {
|
||||
default = {
|
||||
isDefault = true;
|
||||
id = 0;
|
||||
inherit extensions settings userChrome;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,88 +1,76 @@
|
||||
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/toolbars_below_content.css made available under Mozilla Public License v. 2.0
|
||||
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/toolbars_below_content_v2.css made available under Mozilla Public License v. 2.0
|
||||
See the above repository for updates as well as full license text. */
|
||||
|
||||
/* Moves tabs toolbar, bookmarks toolbar and main toolbar to the bottom of the window, and makes tabs be the bottom-most toolbar */
|
||||
|
||||
/* By default, menubar will stay on top with two options to select it's behavior - see below */
|
||||
|
||||
@-moz-document url(chrome://browser/content/browser.xhtml){
|
||||
|
||||
#titlebar{ -moz-appearance: none !important; }
|
||||
|
||||
#navigator-toolbox > div{ display: contents }
|
||||
.global-notificationbox,
|
||||
#mainPopupSet,
|
||||
#browser,
|
||||
#customization-container,
|
||||
#tab-notification-deck{
|
||||
order: -1;
|
||||
}
|
||||
|
||||
/* Remove the next row if you want tabs to be the top-most row */
|
||||
#titlebar{
|
||||
order: 2;
|
||||
}
|
||||
|
||||
#toolbar-menubar{
|
||||
position: fixed;
|
||||
display: flex;
|
||||
width: 100vw;
|
||||
top: 0px;
|
||||
-moz-window-dragging: drag;
|
||||
}
|
||||
/* Remove bottom border that won't do anything useful when at bottom of the window */
|
||||
#navigator-toolbox{ border-bottom: none !important; }
|
||||
|
||||
#toolbar-menubar > spacer{ flex-grow: 1 }
|
||||
|
||||
#urlbar[breakout][breakout-extend]{
|
||||
display: flex !important;
|
||||
flex-direction: column-reverse;
|
||||
bottom: 0px !important; /* Change to 3-5 px if using compact_urlbar_megabar.css depending on toolbar density */
|
||||
top: auto !important;
|
||||
}
|
||||
|
||||
.urlbarView-body-inner{ border-top-style: none !important; }
|
||||
|
||||
/* Yeah, removes window controls. Likely not wanted on bottom row */
|
||||
#TabsToolbar > .titlebar-buttonbox-container{ display: none }
|
||||
#toolbar-menubar > .titlebar-buttonbox-container{ order: 1000 }
|
||||
|
||||
/* Fix panels sizing */
|
||||
.panel-viewstack{ max-height: unset !important; }
|
||||
|
||||
/* Fullscreen mode support */
|
||||
:root[sizemode="fullscreen"] #navigator-toolbox{ margin-top: 0 !important }
|
||||
:root[sizemode="fullscreen"] #navigator-toolbox[style*="margin-top"]{ visibility: collapse }
|
||||
#fullscr-toggler{ bottom: 0; top: unset !important; }
|
||||
|
||||
/* These three rules exist for compatibility with autohide_toolbox.css */
|
||||
#navigator-toolbox{ bottom: 0px; transform-origin: bottom }
|
||||
#main-window > body > box{ margin-top: 0 !important; }
|
||||
#toolbar-menubar{ z-index: 1; background-color: var(--lwt-accent-color,black); }
|
||||
|
||||
:root[BookmarksToolbarOverlapsBrowser] #navigator-toolbox{
|
||||
margin-block: calc(-1 * var(--bookmarks-toolbar-height)) 0 !important;
|
||||
}
|
||||
:root[BookmarksToolbarOverlapsBrowser] .newTabBrowserPanel{
|
||||
padding-block: 0 var(--bookmarks-toolbar-height) !important;
|
||||
}
|
||||
|
||||
/**************
|
||||
Menubar options - By default, menubar is overlayed on top of web-content
|
||||
***************/
|
||||
|
||||
/* Uncomment the following if you want static menubar on top of the window (make menubar enabled)
|
||||
* Use when menubar is enabled to always show it */
|
||||
|
||||
/*
|
||||
#browser,#customization-container{ padding-top: var(--uc-menubar-spacer,28px) }
|
||||
/* This requires Firefox 133
|
||||
* By default tabs will be the top-most toolbar, but you can set the following pref to move them to bottom:
|
||||
* userchrome.toolbars-below-content.tabs-at-bottom.enabled
|
||||
*/
|
||||
|
||||
/* OR, uncomment the following if you want menubar to appear below content, above tabs toolbar */
|
||||
|
||||
#toolbar-menubar{ position: static; display: flex; margin-top: 0px !important; background-color: transparent }
|
||||
|
||||
/* set to "column-reverse" (without quotes) if you want tabs above menubar with the above option */
|
||||
#titlebar{ flex-direction: column }
|
||||
#navigator-toolbox{
|
||||
display: contents;
|
||||
--uc-navbar-height: 40px;
|
||||
}
|
||||
:root[uidensity="compact"] #navigator-toolbox{
|
||||
--uc-navbar-height: 34px;
|
||||
}
|
||||
#main-window > body > #browser,
|
||||
.global-notificationbox,
|
||||
#tab-notification-deck,
|
||||
#toolbar-menubar{
|
||||
order: -1;
|
||||
}
|
||||
|
||||
#TabsToolbar{
|
||||
max-height: calc((var(--tab-min-height) + 2 * var(--tab-block-margin,0px)) * var(--multirow-n-rows,1));
|
||||
}
|
||||
#toolbar-menubar,
|
||||
#TabsToolbar{
|
||||
background: inherit !important;
|
||||
}
|
||||
@media (-moz-platform: linux){
|
||||
:root[sizemode="normal"][customtitlebar] #toolbar-menubar{
|
||||
border-top-left-radius: inherit;
|
||||
border-top-right-radius: inherit;
|
||||
}
|
||||
#toolbar-menubar,
|
||||
#TabsToolbar{
|
||||
opacity: 1 !important;
|
||||
will-change: unset !important;
|
||||
}
|
||||
#notification-popup[side="top"]{
|
||||
margin-top: calc(-2 * var(--panel-padding-block) - 40px - 32px - 8.5em) !important;
|
||||
}
|
||||
#permission-popup[side="top"]{
|
||||
margin-top: calc(-2 * var(--panel-padding-block) - 2.5em);
|
||||
}
|
||||
}
|
||||
|
||||
#nav-bar,
|
||||
#PersonalToolbar{
|
||||
background-image: linear-gradient(var(--toolbar-bgcolor),var(--toolbar-bgcolor)), var(--lwt-additional-images,var(--toolbar-bgimage)) !important;
|
||||
background-position: top,var(--lwt-background-alignment);
|
||||
background-position-y: calc(0px - var(--tab-min-height) - 2*var(--tab-block-margin,0px));
|
||||
background-repeat: repeat,var(--lwt-background-tiling);
|
||||
}
|
||||
:root[lwtheme-image] #nav-bar,
|
||||
:root[lwtheme-image] #PersonalToolbar{
|
||||
background-image: linear-gradient(var(--toolbar-bgcolor),var(--toolbar-bgcolor)),var(--lwt-header-image), var(--lwt-additional-images,var(--toolbar-bgimage)) !important;
|
||||
}
|
||||
#PersonalToolbar{
|
||||
background-position-y: calc(0px - var(--tab-min-height) - 2*var(--tab-block-margin,0px) - var( --uc-navbar-height));
|
||||
}
|
||||
#urlbar[breakout][breakout-extend]{
|
||||
display: flex !important;
|
||||
flex-direction: column-reverse !important;
|
||||
transform: translateY(calc(var(--urlbar-container-height) - 100%));
|
||||
}
|
||||
#urlbar[breakout-extend]:not([usertyping]) > .urlbar-input-container::after{
|
||||
display: flex;
|
||||
content: "";
|
||||
height: calc(var(--urlbar-min-height) - 2px - 2 * var(--urlbar-container-padding));
|
||||
}
|
||||
.urlbarView-body-inner{ border-top-style: none !important; }
|
||||
|
||||
#TabsToolbar{
|
||||
order: 3
|
||||
}
|
||||
|
@ -212,16 +212,16 @@ in {
|
||||
url = "https://git.fuckwit.dev";
|
||||
tokenFile = config.sops.secrets."act-runner-token".path;
|
||||
labels = [
|
||||
"native:host"
|
||||
];
|
||||
hostPackages = with pkgs; [
|
||||
bash
|
||||
coreutils
|
||||
curl
|
||||
wget
|
||||
gnused
|
||||
gitMinimal
|
||||
"nix:docker://nixos/nix:latest"
|
||||
];
|
||||
# hostPackages = with pkgs; [
|
||||
# bash
|
||||
# coreutils
|
||||
# curl
|
||||
# wget
|
||||
# gnused
|
||||
# gitMinimal
|
||||
# ];
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user