Reorganized
This commit is contained in:
1 parent
c3c61ce654
commit
760815da50
145 files changed
-1444
No files matched your search
@@ -0,0 +1,34 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
{
|
||||
imports = [
|
||||
./firefox/default.nix
|
||||
./qutebrowser/default.nix
|
||||
];
|
||||
|
||||
options.default.browser = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
description = "Default browser";
|
||||
};
|
||||
|
||||
config = {
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
|
||||
defaultApplications = {
|
||||
"text/html" = "${config.default.browser}";
|
||||
"x-scheme-handler/http" = "${config.default.browser}";
|
||||
"x-scheme-handler/https" = "${config.default.browser}";
|
||||
"x-scheme-handler/about" = "${config.default.browser}";
|
||||
"x-scheme-handler/unknown" = "${config.default.browser}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.firefox;
|
||||
in
|
||||
{
|
||||
options.modules.firefox = {
|
||||
enable = lib.mkEnableOption "firefox";
|
||||
default = lib.mkEnableOption "default";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
default.browser = mkIf cfg.default "firefox.desktop";
|
||||
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
|
||||
policies = {
|
||||
AppAutoUpdate = false;
|
||||
BlockAboutAddons = false;
|
||||
BlockAboutConfig = true;
|
||||
BlockAboutProfiles = true;
|
||||
DisableAppUpdate = true;
|
||||
DisableFeedbackCommands = true;
|
||||
DisableMasterPasswordCreation = true;
|
||||
DisablePocket = true;
|
||||
DisableProfileImport = true;
|
||||
DisableProfileRefresh = true;
|
||||
DisableSetDesktopBackground = true;
|
||||
DisableTelemetry = true;
|
||||
DisplayBookmarksToolbar = "never";
|
||||
DisplayMenuBar = "never";
|
||||
DNSOverHTTPS = {
|
||||
Enabled = false;
|
||||
};
|
||||
DontCheckDefaultBrowser = true;
|
||||
PasswordManagerEnabled = false;
|
||||
TranslateEnabled = true;
|
||||
UseSystemPrintDialog = true;
|
||||
};
|
||||
|
||||
profiles.nixos = {
|
||||
search.default = "ddg";
|
||||
|
||||
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
ublock-origin
|
||||
];
|
||||
|
||||
# Theming
|
||||
userChrome = readFile (
|
||||
pkgs.replaceVars ./userChrome.css {
|
||||
colors = config.desktop.theming.colorsCSS;
|
||||
}
|
||||
);
|
||||
|
||||
settings = {
|
||||
"browser.tabs.inTitlebar" = 0;
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
"devtools.chrome.enabled" = true;
|
||||
"devtools.debugger.remote-enabled" = true;
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
};
|
||||
|
||||
# Force overwriting configuration file
|
||||
search.force = true;
|
||||
containersForce = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
/* Import theme colors */
|
||||
@colors@
|
||||
|
||||
/* Configure titlebar */
|
||||
#titlebar {
|
||||
/* Add consistent margins to tab bar */
|
||||
padding: 0 2px !important;
|
||||
|
||||
/* Add emphasized color to background of tab bar */
|
||||
background-color: var(--nix-color-bg-status) !important;
|
||||
|
||||
/* Set correct text color */
|
||||
color: var(--nix-color-fg) !important;
|
||||
}
|
||||
|
||||
.tab-background:is([selected], [multiselected]) {
|
||||
/* Set correct background color */
|
||||
background-color: var(--nix-color-bg) !important;
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
/* Set correct text color */
|
||||
color: var(--nix-color-fg) !important;
|
||||
}
|
||||
|
||||
/* Configure navigation bar */
|
||||
#nav-bar {
|
||||
/* Set correct background color */
|
||||
background-color: var(--nix-color-bg) !important;
|
||||
|
||||
/* Set correct text color */
|
||||
color: var(--nix-color-fg) !important;
|
||||
}
|
||||
|
||||
#urlbar {
|
||||
/* Set correct text color */
|
||||
color: var(--nix-color-fg) !important;
|
||||
}
|
||||
|
||||
#urlbar[open]>#urlbar-background {
|
||||
/* Set correct background color when opened */
|
||||
background-color: var(--nix-color-bg) !important;
|
||||
|
||||
/* Use same box-shadow as tabs when opened */
|
||||
border: none !important;
|
||||
box-shadow: 0 0 4px rgba(0, 0, 0, .4) !important;
|
||||
}
|
||||
|
||||
#urlbar[focused]:not([suppress-focus-border])>#urlbar-background {
|
||||
/* Set better outline for focused urlbar */
|
||||
outline-color: var(--nix-color-border-focused) !important;
|
||||
outline-width: 1px !important;
|
||||
outline-offset: 0 !important;
|
||||
}
|
||||
|
||||
#urlbar-background {
|
||||
/* Set the correct background color */
|
||||
background-color: var(--nix-color-bg-status) !important;
|
||||
}
|
||||
|
||||
/* Configure popups */
|
||||
panelview {
|
||||
/* Set correct background color for popups */
|
||||
background-color: var(--nix-color-bg) !important;
|
||||
|
||||
/* Set correct text color */
|
||||
color: var(--nix-color-fg) !important;
|
||||
}
|
||||
|
||||
menupopup {
|
||||
/* Set correct background color for context menus */
|
||||
--panel-background: var(--nix-color-bg) !important;
|
||||
}
|
||||
Whitespace-only changes.
@@ -0,0 +1,34 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.qutebrowser;
|
||||
theme = config.desktop.theming;
|
||||
in
|
||||
{
|
||||
options.modules.qutebrowser = {
|
||||
enable = mkEnableOption "qutebrowser";
|
||||
default = mkEnableOption "default";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
default.browser = mkIf cfg.default "org.qutebrowser.qutebrowser.desktop";
|
||||
|
||||
programs.qutebrowser = {
|
||||
enable = true;
|
||||
|
||||
extraConfig = ''
|
||||
config.set("completion.web_history.max_items", 256)
|
||||
config.set("colors.webpage.darkmode.enabled", False)
|
||||
config.set("colors.webpage.preferred_color_scheme", "${if theme.darkMode then "dark" else "light"}")
|
||||
config.set("fonts.default_family", "${theme.fonts.interface.name}")
|
||||
config.set("fonts.default_size", "${toString theme.fonts.interface.recommendedSize}pt")
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user