This commit is contained in:
joy 2024-11-27 16:14:50 +01:00
parent 3630f4585d
commit 22e412a239
3 changed files with 322 additions and 282 deletions

View file

@ -26,7 +26,7 @@
inherit nixpath; inherit nixpath;
inherit pkgs-stable; inherit pkgs-stable;
}; };
modules = modules ++ [home-manager.nixosModules.default sops-nix.nixosModules.sops]; modules = modules ++ [home-manager.nixosModules.default sops-nix.nixosModules.sops stylix.nixosModules.stylix];
}; };
in { in {
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration { nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {

View file

@ -10,256 +10,289 @@
enable = true; enable = true;
profiles.${username} = { profiles.${username} = {
userChrome = '' userChrome = ''
#alltabs-button { display: none !important; } #alltabs-button { display: none !important; }
@namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; @namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
:root { :root {
--background: #${config.home-manager.users.${username}.stylix.base16Scheme.base00}; --background: #1d2021;
--secondary: #${config.home-manager.users.${username}.stylix.base16Scheme.base01}; --secondary: #282828;
--foreground: #${config.home-manager.users.${username}.stylix.base16Scheme.base05}; --foreground: #EBDBB2;
--blue-highlight: #${config.home-manager.users.${username}.stylix.base16Scheme.base0D}; --orange-highlight: #fe8019;
--separator: #${config.home-manager.users.${username}.stylix.base16Scheme.base03}; --sound-border: #68217A;
--toolbar-bgcolor: var(--secondary) !important; --separator: #665e54;
--tab: var(--background); --toolbar-bgcolor: var(--secondary) !important;
--tab-inactive: var(--secondary); --tab: var(--background);
--tab-hover: #${config.home-manager.users.${username}.stylix.base16Scheme.base02}; --tab-btn: var(--tab-inactive);
--url-bar: #${config.home-manager.users.${username}.stylix.base16Scheme.base01}; --tab-inactive: var(--secondary);
} --tab-btn-inactive: var(--tab-inactive);
--tab-hover: #32302f;
.titlebar-buttonbox-container { --tab-btn-hover: #3C3836;
display: none !important; --toolbar-btn-hover: #49463f;
} --url-bar: #3C3836; /* Updated color */
--url-focus: #3C3836;
.panel-arrowcontainer { --url-bar-item-hover: #6a6257;
background-color: var(--secondary) !important; --sidebar: #3C3836;
} --sidebar-button-hover: #5A544B;
--sidebar-highlight: #458588;
#PopupAutoComplete, }
#PopupSearchAutoComplete {
background-color: var(--url-bar) !important; .titlebar-buttonbox-container {
color: var(--foreground) !important; display: none !important;
} }
panelview { .panel-arrowcontainer {
background-color: var(--secondary) !important; background-color: var(--secondary) !important;
color: var(--foreground) !important; }
}
#PopupAutoComplete,
panel[type="autocomplete-richlistbox"] { #PopupSearchAutoComplete {
background-color: transparent !important; background-color: var(--url-focus) !important;
border-radius: 4px !important; color: var(--foreground) !important;
color: var(--foreground) !important; }
}
panelview {
toolbarseparator, background-color: var(--sidebar) !important;
menuseparator { color: var(--foreground) !important;
border-color: var(--separator) !important; }
border-image: none !important;
} panel[type="autocomplete-richlistbox"] {
--panel-background: none !important;
toolbar { border-radius: 4px !important;
background-color: var(--secondary); color: var(--foreground) !important;
} }
toolbar#TabsToolbar { toolbarseparator,
background-color: var(--background); menuseparator {
} border-color: var(--separator) !important;
border-image: none !important;
toolbar#TabsToolbar:-moz-window-inactive { }
background-color: var(--toolbar-bgcolor) !important;
} toolbar {
background-color: var(--secondary);
#titlebar, }
#titlebar-spacer,
#titlebar-buttonbox-container { toolbar#TabsToolbar {
background-color: var(--background) !important; background-color: var(--background);
border: none !important; }
}
toolbar#TabsToolbar:-moz-window-inactive {
#navigator-toolbox { background-color: var(--toolbar-bgcolor) !important;
border: none !important; }
}
#titlebar,
#urlbar, #titlebar-spacer,
#searchbar { #titlebar-buttonbox-container {
box-shadow: none !important; background-color: var(--background) !important;
border: none !important; border: none !important;
border-radius: 4px; }
color: var(--foreground) !important;
background-color: var(--url-bar) !important; #navigator-toolbox {
} --tabs-border-color: var(--orange-highlight) !important;
}
#urlbar-input,
#urlbar-input-container { #navigator-toolbox::after {
color: var(--foreground) !important; border-bottom: 0px !important;
background-color: var(--url-bar) !important; }
}
#navigator-toolbox {
#urlbar:not([open]) #urlbar-input-container:focus-within, border: none !important;
#searchbar:focus-within { }
border: 2px solid var(--blue-highlight) !important;
} #urlbar,
#searchbar {
#urlbar:focus-within, box-shadow: none !important;
#urlbar[open], border: none !important;
#urlbar[open] #urlbar-input-container, border-radius: 4px;
#urlbar[open] #urlbar-input, color: var(--foreground) !important;
#urlbar-input-container:focus-within, background-color: var(--url-bar) !important;
#urlbar-input:focus, --autocomplete-popup-separator-color: var(--separator) !important;
menupop { }
background-color: var(--url-bar) !important;
} #urlbar-input,
#urlbar-input-container {
:is(panel, menupopup)::part(content) { color: var(--foreground) !important;
background:none!important; background-color: var(--url-bar) !important;
} }
.urlbarView button:hover, #urlbar:not([open]) #urlbar-input-container:focus-within,
#searchbar button:hover, #searchbar:focus-within {
.urlbarView-row:hover .urlbarView-row-inner, border: 2px solid var(--orange-highlight) !important;
.search-autocomplete-richlistbox-popup .autocomplete-richlistitem:hover { }
background-color :var(--blue-highlight)!important;
} #urlbar:focus-within,
#urlbar[open],
.urlbarView-row[type="switchtab"] > span { #urlbar[open] #urlbar-input-container,
color :var(--blue-highlight)!important; #urlbar[open] #urlbar-input,
} #urlbar-input-container:focus-within,
#urlbar-input:focus,
#PopupSearchAutoComplete .autocomplete-richlistitem[selected], #urlbar-background,
.searchbar-engine-one-off-item[selected], .urlbarView,
.urlbarView-row[selected], #searchbar:focus-within,
.urlbarView-row[aria-selected="true"], menupop {
.urlbarView-row:not([type="tip"], [type="dynamic"])[selected] > .urlbarView-row-inner, background-color: var(--url-focus) !important;
.urlbarView-row-inner[selected] { }
color :var(--foreground)!important;
background-color :var(--blue-highlight)!important; #searchbar:focus-within {
border-radius :4px!important; outline: none !important;
} }
#PersonalToolbar { :is(panel, menupopup)::part(content) {
background-color :var(--secondary)!important; background: none !important;
} }
.tab-background[selected="true"] { .urlbarView button:hover,
background-color :transparent!important; #searchbar button:hover,
background-image :none!important; .urlbarView-row:hover .urlbarView-row-inner,
} .search-autocomplete-richlistbox-popup .autocomplete-richlistitem:hover {
background-color: var(--url-bar-item-hover) !important;
.tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected="true"]):not([multiselected]) { }
background-color :transparent!important;
} .urlbarView-row[type="switchtab"] > span {
color: var(--orange-highlight) !important;
.tabbrowser-tab[soundplaying="true"] { }
border-bottom-color :var(--blue-highlight)!important;
} #PopupSearchAutoComplete .autocomplete-richlistitem[selected],
.searchbar-engine-one-off-item[selected],
.tab-content[selected="true"] { .urlbarView-row[selected],
border-color :var(--blue-highlight)!important; .urlbarView-row[aria-selected="true"],
} .urlbarView-row:not([type="tip"], [type="dynamic"])[selected] > .urlbarView-row-inner,
.urlbarView-row-inner[selected] {
.tab-text { color: var(--foreground) !important;
color :var(--foreground); background-color: var(--sidebar-highlight) !important;
} border-radius: 4px !important;
}
tab,
#tabbrowser-tabs { #PersonalToolbar {
background-color :var(--background)!important; background-color: var(--secondary) !important;
color :var(--foreground)!important; }
}
.tab-background[selected="true"] {
tab:-moz-window-inactive, background-color: transparent !important;
#tabbrowser-tabs:-moz-window-inactive, background-image: none !important;
#nav-bar-customization-target { }
background-color :var(--secondary)!important;
} .tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected="true"]):not([multiselected]) {
background-color: transparent !important;
.tabbrowser-tab[selected] { }
opacity :1;
} .tabbrowser-tab[soundplaying="true"] {
--lwt-tab-line-color: var(--sound-border) !important;
.tab-loading-burst { }
background-color :inherit;
} .tab-content[selected="true"] {
border-color: var(--orange-highlight) !important;
.tab-content { --sound-border: var(--orange-highlight) !important;
border-radius :4px; }
margin :5px 0px 5px 0px!important;
border :1px solid transparent!important; .tab-text {
} color: var(--foreground);
}
.tab-content[selected="true"] {
background-color :var(--secondary)!important; tab,
color :var(--foreground)!important; #tabbrowser-tabs {
border :1px solid var(--blue-highlight)!important; background-color: var(--background) !important;
} color: var(--foreground) !important;
}
.tab-content:not([selected="true"]):hover {
background-color :var(--tab-hover)!important; tab:-moz-window-inactive,
} #tabbrowser-tabs:-moz-window-inactive,
#nav-bar-customization-target {
toolbarbutton { background-color: var(--secondary) !important;
fill :var(--foreground)!important; }
background-color :transparent!important;
} .tabbrowser-tab[selected] {
opacity: 1;
#TabsToolbar toolbarbutton { }
border-radius :4px;
border :1px solid transparent!important; .tab-loading-burst {
} background-color: inherit;
}
#alltabs-button > .toolbarbutton-badge-stack,
#tabs-newtab-button > .toolbarbutton-icon { .tab-content {
background-image :none; border-radius: 4px;
border-radius :6px; margin: 5px 0px 5px 0px !important;
} border: 1px solid transparent !important;
}
#alltabs-button:hover > .toolbarbutton-badge-stack,
#tabs-newtab-button:hover > .toolbarbutton-icon { .tab-content[selected="true"] {
background-color :var(--blue-highlight)!important; background-color: var(--secondary) !important;
} color: var(--foreground) !important;
border: 1px solid var(--orange-highlight) !important;
#TabsToolbar #firefox-view-button > .toolbarbutton-icon { }
background-image :none!important;
border-radius :4px; .tab-content:not([selected="true"]):hover {
} background-color: var(--tab-hover) !important;
}
#TabsToolbar #firefox-view-button[open] > .toolbarbutton-icon {
background-color :var(--secondary)!important; toolbarbutton {
color :var(--foreground)!important; fill: var(--foreground) !important;
padding :9px!important; background-color: transparent !important;
border :1px solid var(--blue-highlight)!important; }
}
#TabsToolbar toolbarbutton {
/* Hover effect for Firefox view button */ border-radius: 4px;
#TabsToolbar #firefox-view-button:not([open]):hover > .toolbarbutton-icon { border: 1px solid transparent !important;
background-color :var(--tab-hover)!important; }
#alltabs-button > .toolbarbutton-badge-stack,
#tabs-newtab-button > .toolbarbutton-icon {
background-image: none;
border-radius: 6px;
}
#alltabs-button:hover > .toolbarbutton-badge-stack,
#tabs-newtab-button:hover > .toolbarbutton-icon {
background-color: var(--tab-btn-hover) !important;
}
#TabsToolbar #firefox-view-button > .toolbarbutton-icon {
background-image: none !important;
border-radius: 4px;
}
#TabsToolbar #firefox-view-button[open] > .toolbarbutton-icon {
background-color: var(--secondary) !important;
color: var(--foreground) !important;
padding: 9px !important;
border: 1px solid var(--orange-highlight) !important;
}
#TabsToolbar #firefox-view-button:not([open]):hover > .toolbarbutton-icon {
background-color: var(--tab-hover) !important;
} }
/* Nav bar button styles */
#nav-bar toolbarbutton > .toolbarbutton-icon, #nav-bar toolbarbutton > .toolbarbutton-icon,
#nav-bar toolbarbutton > .toolbarbutton-badge-stack { #nav-bar toolbarbutton > .toolbarbutton-badge-stack {
border-radius :6px; border-radius: 6px;
} }
/* Nav bar button hover effect */
#nav-bar toolbarbutton:hover > .toolbarbutton-icon, #nav-bar toolbarbutton:hover > .toolbarbutton-icon,
#nav-bar toolbarbutton:hover > .toolbarbutton-badge-stack { #nav-bar toolbarbutton:hover > .toolbarbutton-badge-stack {
background-color :var(--blue-highlight)!important; background-color: var(--toolbar-btn-hover) !important;
} }
/* Back button padding */
#back-button { #back-button {
padding-right :2px!important; padding-right: 2px !important;
padding-left :2px!important; padding-left: 2px !important;
margin-left :6px!important; margin-left: 6px !important;
} }
/* Panel UI menu button styles */
#PanelUI-menu-button { #PanelUI-menu-button {
background-color :var(--secondary)!important; background-color: var(--secondary) !important;
padding-right :2px!important; padding-right: 2px !important;
margin-right :6px!important; margin-right: 6px !important;
} }
#PersonalToolbar toolbarbutton {
margin: 3px 0px 3px 3px !important;
border-radius: 4px;
}
#PersonalToolbar toolbarbutton:hover {
background-color: var(--toolbar-btn-hover) !important;
}
''; '';
}; };
}; };

View file

@ -1,6 +1,5 @@
{ {
pkgs, pkgs,
inputs,
username, username,
lib, lib,
config, config,
@ -13,62 +12,70 @@ in {
theme.enable = lib.mkEnableOption ""; theme.enable = lib.mkEnableOption "";
}; };
config = lib.mkIf config.theme.enable { config = lib.mkIf config.theme.enable {
home-manager.users.${username} = { stylix = {
imports = [inputs.stylix.homeManagerModules.stylix]; enable = true;
polarity = "dark";
image = pkgs.fetchurl {
url = backgroundUrl;
sha256 = backgroundSha256;
};
base16Scheme = {
base00 = "282828"; # ----
base01 = "3c3836"; # ---
base02 = "504945"; # --
base03 = "665c54"; # -
base04 = "bdae93"; # +
base05 = "d5c4a1"; # ++
base06 = "ebdbb2"; # +++
base07 = "fbf1c7"; # ++++
base08 = "cc241d"; # red
base09 = "fe0819"; # orange
base0A = "d79921"; # yellow
base0B = "98971a"; # green
base0C = "689d6a"; # aqua/cyan
base0D = "458588"; # blue
base0E = "b16286"; # purple
base0F = "a89984"; # brown
};
cursor = {
name = "Bibata-Modern-Ice";
package = pkgs.bibata-cursors;
size = 24;
};
fonts = {
monospace = {
package = pkgs.nerdfonts.override {fonts = ["RobotoMono"];};
name = "RobotoMono Nerd Font";
};
sizes = {
applications = 12;
terminal = 13;
desktop = 12;
popups = 12;
};
};
};
home-manager.users.${username} = {
stylix = { stylix = {
enable = true; enable = true;
polarity = "dark";
targets = { targets = {
rofi.enable = false; rofi.enable = false;
dunst.enable = false; dunst.enable = false;
helix.enable = false; helix.enable = false;
}; };
base16Scheme = {
base00 = "282828"; # ----
base01 = "3c3836"; # ---
base02 = "504945"; # --
base03 = "665c54"; # -
base04 = "bdae93"; # +
base05 = "d5c4a1"; # ++
base06 = "ebdbb2"; # +++
base07 = "fbf1c7"; # ++++
base08 = "cc241d"; # red
base09 = "fe0819"; # orange
base0A = "d79921"; # yellow
base0B = "98971a"; # green
base0C = "689d6a"; # aqua/cyan
base0D = "458588"; # blue
base0E = "b16286"; # purple
base0F = "a89984"; # brown
};
image = pkgs.fetchurl {
url = backgroundUrl;
sha256 = backgroundSha256;
};
cursor = {
name = "Bibata-Modern-Ice";
package = pkgs.bibata-cursors;
size = 24;
};
fonts = {
monospace = {
package = pkgs.nerdfonts.override {fonts = ["RobotoMono"];};
name = "RobotoMono Nerd Font";
};
sizes = {
applications = 12;
terminal = 13;
desktop = 12;
popups = 12;
};
};
}; };
xresources.path = ".config/.Xresources"; xresources.path = ".config/.Xresources";
}; };
home-manager.users.root = {
stylix = {
enable = true;
targets = {
rofi.enable = false;
dunst.enable = false;
helix.enable = false;
};
};
};
}; };
} }