Move fonts into stylix config, disable stylix waybar

Remove fonts and scheme from base system, update uses of to point to
stylix instead.

Remove some left over files from the earlier rearrange.

Disable waybar stylix target - TODO write a custom moustache at some
point to re-enable with my custom style
This commit is contained in:
Evie Litherland-Smith 2024-09-20 08:33:10 +01:00
parent 7e2ab5a640
commit 522f2fa91c
18 changed files with 109 additions and 290 deletions

View file

@ -142,23 +142,6 @@
}; };
extraSpecialArgs = { extraSpecialArgs = {
inherit inputs; inherit inputs;
accentColourName = "base0E";
# Emulating stylix behaviour, rewrite at some point
fonts =
let
monospace.name = inputs.iosevka-custom.outputs.names.iosevka-custom-nerdfont;
serif.name = inputs.iosevka-custom.outputs.names.iosevka-custom-aile;
sansSerif.name = serif.name;
in
{
inherit monospace serif sansSerif;
sizes = {
applications = 12;
desktop = 14;
popups = 16;
terminal = 12;
};
};
}; };
}; };
environment = { environment = {
@ -236,6 +219,12 @@
inherit monospace; inherit monospace;
serif = proportional; serif = proportional;
sansSerif = proportional; sansSerif = proportional;
sizes = {
applications = 12;
desktop = 14;
popups = 16;
terminal = 12;
};
}; };
}; };
fonts = { fonts = {

View file

@ -1,17 +1,12 @@
{ { config, pkgs, ... }:
config,
pkgs,
fonts,
accentColourName,
...
}:
{ {
home.packages = [ pkgs.nyxt ]; home.packages = [ pkgs.nyxt ];
xdg = { xdg = {
configFile = { configFile = {
"nyxt/config.lisp".text = "nyxt/config.lisp".text =
let let
sc = config.scheme.withHashtag; fonts = config.stylix.fonts;
scheme = config.lib.stylix.scheme;
in in
'' ''
;; Import custom configuration ;; Import custom configuration
@ -22,24 +17,24 @@
:dark-p t :dark-p t
:font-family "${fonts.sansSerif.name}" :font-family "${fonts.sansSerif.name}"
:monospace-font-family "${fonts.monospace.name}" :monospace-font-family "${fonts.monospace.name}"
:background-color "${sc.base00}" :background-color "${scheme.withHashtag.base00}"
:on-background-color "${sc.base05}" :on-background-color "${scheme.withHashtag.base05}"
:primary-color "${sc.base02}" :primary-color "${scheme.withHashtag.base02}"
:on-primary-color "${sc.base05}" :on-primary-color "${scheme.withHashtag.base05}"
:secondary-color "${sc.base03}" :secondary-color "${scheme.withHashtag.base03}"
:on-secondary-color "${sc.base05}" :on-secondary-color "${scheme.withHashtag.base05}"
:accent-color "${sc.${accentColourName}}" :accent-color "${scheme.withHashtag.base0D}"
:on-accent-color "${sc.base01}" :on-accent-color "${scheme.withHashtag.base01}"
:action-color "${sc.cyan}" :action-color "${scheme.withHashtag.cyan}"
:on-action-color "${sc.base01}" :on-action-color "${scheme.withHashtag.base01}"
:success-color "${sc.green}" :success-color "${scheme.withHashtag.green}"
:on-success-color "${sc.base01}" :on-success-color "${scheme.withHashtag.base01}"
:highlight-color "${sc.magenta}" :highlight-color "${scheme.withHashtag.magenta}"
:on-highlight-color "${sc.base01}" :on-highlight-color "${scheme.withHashtag.base01}"
:warning-color "${sc.yellow}" :warning-color "${scheme.withHashtag.yellow}"
:on-warning-color "${sc.base01}" :on-warning-color "${scheme.withHashtag.base01}"
:codeblock-color "${sc.base02}" :codeblock-color "${scheme.withHashtag.base02}"
:on-codeblock-color "${sc.base05}")))) :on-codeblock-color "${scheme.withHashtag.base05}"))))
''; '';
}; };
dataFile."nyxt/bookmarks.lisp".text = dataFile."nyxt/bookmarks.lisp".text =

View file

@ -1,16 +1,10 @@
{ inputs, osConfig, ... }: { inputs, ... }:
{ {
imports = [ imports = [
inputs.base16.homeManagerModule
inputs.nix-index-database.hmModules.nix-index inputs.nix-index-database.hmModules.nix-index
./shell/default.nix ./shell/default.nix
./services/password-store/default.nix ./services/password-store/default.nix
./scripts/default.nix ./scripts/default.nix
]; ];
programs.home-manager.enable = true; programs.home-manager.enable = true;
scheme = "${inputs.tt-schemes}/base16/one-light.yaml";
fonts.fontconfig = {
enable = true;
inherit (osConfig.fonts.fontconfig) defaultFonts;
};
} }

View file

@ -1,9 +1,4 @@
{ { config, pkgs, ... }:
config,
pkgs,
fonts,
...
}:
{ {
imports = [ ../shell/default.nix ]; imports = [ ../shell/default.nix ];
stylix.targets.emacs.enable = false; stylix.targets.emacs.enable = false;
@ -22,9 +17,11 @@
package = pkgs.emacs29-pgtk; package = pkgs.emacs29-pgtk;
extraConfig = extraConfig =
let let
fixed-font-family = "${fonts.monospace.name}"; fixed-font-family = "${config.stylix.fonts.monospace.name}";
variable-font-family = "${fonts.sansSerif.name}"; variable-font-family = "${config.stylix.fonts.sansSerif.name}";
font-height = builtins.toString (builtins.floor (builtins.mul fonts.sizes.applications 10)); font-height = builtins.toString (
builtins.floor (builtins.mul config.stylix.fonts.sizes.applications 10)
);
custom-theme-name = "nix"; custom-theme-name = "nix";
custom-theme = pkgs.writeTextFile { custom-theme = pkgs.writeTextFile {
name = "custom-emacs-theme"; name = "custom-emacs-theme";

View file

@ -2,8 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
fonts,
accentColourName,
... ...
}: }:
{ {
@ -25,8 +23,8 @@
{ {
clickItemTo = "open"; clickItemTo = "open";
theme = "default"; theme = "default";
colorScheme = "Breeze${toCapital config.scheme.variant}"; colorScheme = "Breeze${toCapital config.lib.stylix.scheme.variant}";
iconTheme = "Papirus-${toCapital config.scheme.variant}"; iconTheme = "Papirus-${toCapital config.lib.stylix.scheme.variant}";
windowDecorations = { windowDecorations = {
library = "org.kde.breeze"; library = "org.kde.breeze";
theme = "Breeze"; theme = "Breeze";
@ -41,7 +39,7 @@
fonts = fonts =
let let
general = { general = {
family = fonts.sansSerif.name; family = config.stylix.fonts.sansSerif.name;
pointSize = 12; pointSize = 12;
}; };
small = { small = {
@ -49,7 +47,7 @@
pointSize = general.pointSize - 2; pointSize = general.pointSize - 2;
}; };
fixedWidth = { fixedWidth = {
family = fonts.monospace.name; family = config.stylix.fonts.monospace.name;
pointSize = 12; pointSize = 12;
}; };
in in
@ -286,9 +284,9 @@
let let
AccentColor = AccentColor =
let let
r = config.scheme."${accentColourName}-rgb-r"; r = config.lib.stylix.scheme."base0D-rgb-r";
g = config.scheme."${accentColourName}-rgb-g"; g = config.lib.stylix.scheme."base0D-rgb-g";
b = config.scheme."${accentColourName}-rgb-b"; b = config.lib.stylix.scheme."base0D-rgb-b";
in in
"${r}, ${g}, ${b}"; "${r}, ${g}, ${b}";
in in

View file

@ -1,9 +1,4 @@
{ { config, pkgs, ... }:
config,
pkgs,
fonts,
...
}:
{ {
home.packages = [ pkgs.yakuake ]; home.packages = [ pkgs.yakuake ];
programs.konsole = { programs.konsole = {
@ -15,8 +10,8 @@
colorScheme = "onelight"; colorScheme = "onelight";
command = "${config.programs.fish.package}/bin/fish"; command = "${config.programs.fish.package}/bin/fish";
font = { font = {
name = fonts.monospace.name; inherit (config.stylix.fonts.monospace) name;
size = fonts.sizes.terminal; size = config.stylix.fonts.sizes.terminal;
}; };
extraConfig = { extraConfig = {
"Interaction Options" = { "Interaction Options" = {

View file

@ -1,10 +0,0 @@
{ ... }:
{
programs.bat = {
enable = true;
config = {
theme = "OneHalfLight";
style = "plain,numbers,changes";
};
};
}

View file

@ -1,51 +0,0 @@
{ config, accentColourName, ... }:
{
programs.bottom = {
enable = true;
settings = {
flags = {
group_processes = true;
temperature_type = "celsius";
battery = true;
enable_gpu = true;
enable_cache_memory = true;
};
colors =
let
sc = config.scheme.withHashtag;
rainbow = with sc; [
red
yellow
green
cyan
blue
magenta
];
in
{
table_header_color = sc.base05;
all_cpu_color = sc.base05;
avg_cpu_color = sc.base05;
cpu_core_colors = rainbow;
ram_color = sc.red;
cache_color = sc.green;
swap_color = sc.blue;
rx_color = sc.green;
tx_color = sc.blue;
widget_title_color = sc.${accentColourName};
border_color = sc.base02;
highlighted_border_color = sc.${accentColourName};
text_color = sc.base05;
graph_color = sc.base04;
cursor_color = sc.base02;
selected_text_color = sc.base05;
selected_bg_color = sc.base01;
high_battery_color = sc.green;
medium_battery_color = sc.yellow;
low_battery_color = sc.red;
gpu_core_colors = rainbow;
arc_color = sc.cyan;
};
};
};
}

View file

@ -39,7 +39,7 @@
}; };
colors = colors =
let let
rainbow = with config.scheme.withHashtag; [ rainbow = with config.lib.stylix.scheme.withHashtag; [
red red
yellow yellow
green green
@ -96,5 +96,36 @@
copy_on_select = true; copy_on_select = true;
}; };
}; };
zsh = {
enable = true;
enableCompletion = true;
autocd = true;
autosuggestion.enable = true;
defaultKeymap = "emacs";
syntaxHighlighting = {
enable = true;
highlighters = [
"brackets"
"cursor"
];
};
historySubstringSearch.enable = true;
history = {
extended = true;
share = true;
ignoreDups = true;
ignoreAllDups = true;
ignoreSpace = true;
expireDuplicatesFirst = true;
};
initExtra = ''
## completion config and styling
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
zstyle ':completion:*' menu 'select=long-list'
## transient prompt
source ${./transient.zsh}
'';
};
}; };
} }

View file

@ -1,7 +0,0 @@
{ ... }:
{
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
}

View file

@ -1,9 +0,0 @@
{ ... }:
{
programs.eza = {
enable = true;
git = true;
icons = true;
extraOptions = [ "--octal-permissions" ];
};
}

View file

@ -1,7 +0,0 @@
{ ... }:
{
programs.fastfetch = {
enable = true;
settings = { };
};
}

View file

@ -1,9 +0,0 @@
{ pkgs, ... }:
{
programs.fzf = {
enable = true;
defaultCommand = "${pkgs.fd}/bin/fd --type f";
changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d";
fileWidgetCommand = "${pkgs.fd}/bin/fd --type f";
};
}

View file

@ -1,20 +0,0 @@
{ ... }:
{
programs.readline = {
enable = true;
variables = {
bell-style = "visible";
blink-matching-paren = "On";
colored-completion-prefix = "On";
colored-stats = "On";
completion-ignore-case = "On";
completion-map-case = "On";
editing-mode = "emacs";
expand-tilde = "On";
horizontal-scroll-mode = "On";
mark-directories = "On";
mark-symlinked-directories = "On";
visible-stats = "On";
};
};
}

View file

@ -1,28 +0,0 @@
{ config, lib, ... }:
{
programs.zellij = {
enable = true;
settings = {
themes.base16 = with config.scheme.withHashtag; rec {
inherit
red
green
yellow
blue
magenta
cyan
orange
;
black = base00;
bg = black;
white = base05;
fg = white;
};
theme = "base16";
default_mode = "locked";
mouse_mode = true;
copy_command = lib.mkIf config.wayland.windowManager.sway.enable "wl-copy";
copy_on_select = true;
};
};
}

View file

@ -1,34 +0,0 @@
{ ... }:
{
programs.zsh = {
enable = true;
enableCompletion = true;
autocd = true;
autosuggestion.enable = true;
defaultKeymap = "emacs";
syntaxHighlighting = {
enable = true;
highlighters = [
"brackets"
"cursor"
];
};
historySubstringSearch.enable = true;
history = {
extended = true;
share = true;
ignoreDups = true;
ignoreAllDups = true;
ignoreSpace = true;
expireDuplicatesFirst = true;
};
initExtra = ''
## completion config and styling
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
zstyle ':completion:*' menu 'select=long-list'
## transient prompt
source ${./transient.zsh}
'';
};
}

View file

@ -112,7 +112,7 @@
enable = true; enable = true;
iconTheme = { iconTheme = {
package = pkgs.papirus-icon-theme.override { color = "violet"; }; package = pkgs.papirus-icon-theme.override { color = "violet"; };
name = "Papirus-${(import ../lib/to_capital.nix lib) config.scheme.variant}"; name = "Papirus-${(import ../lib/to_capital.nix lib) config.lib.stylix.scheme.variant}";
}; };
}; };
wayland.windowManager.sway = { wayland.windowManager.sway = {

View file

@ -1,11 +1,6 @@
{ config, pkgs, ... }:
{ {
config, stylix.targets.waybar.enable = false;
pkgs,
fonts,
accentColourName,
...
}:
{
systemd.user.targets.tray.Unit = { systemd.user.targets.tray.Unit = {
Description = "Home Manager System Tray"; Description = "Home Manager System Tray";
Requires = [ "graphical-session.target" ]; Requires = [ "graphical-session.target" ];
@ -189,14 +184,14 @@
on-scroll = 1; on-scroll = 1;
format = format =
let let
sc = config.scheme.withHashtag; scheme = config.lib.stylix.scheme.withHashtag;
in in
{ {
months = "<span color='${sc.red}'><b>{}</b></span>"; months = "<span color='${scheme.red}'><b>{}</b></span>";
weeks = "<span color='${sc.cyan}'><b>W{}</b></span>"; weeks = "<span color='${scheme.cyan}'><b>W{}</b></span>";
weekdays = "<span color='${sc.orange}'><b>{}</b></span>"; weekdays = "<span color='${scheme.orange}'><b>{}</b></span>";
days = "<span color='${sc.base05}'><b>{}</b></span>"; days = "<span color='${scheme.base05}'><b>{}</b></span>";
today = "<span color='${sc.${accentColourName}}'><b><i>{}</i></b></span>"; today = "<span color='${scheme.base0D}'><b><i>{}</i></b></span>";
}; };
}; };
actions = { actions = {
@ -277,14 +272,14 @@
}; };
style = style =
let let
sc = config.scheme.withHashtag; scheme = config.lib.stylix.scheme.withHashtag;
alpha = "0.8"; alpha = "0.8";
in in
'' ''
* { * {
all: unset; all: unset;
font-size: ${toString (fonts.sizes.popups + 2)}px; font-family: ${config.stylix.fonts.monospace.name};
font-family: ${fonts.monospace.name}; font-size: ${toString config.stylix.fonts.sizes.popups}px;
} }
window { window {
@ -294,23 +289,23 @@
} }
window > box { window > box {
color: ${sc.base05}; color: ${scheme.base05};
background: ${sc.base00}; background: ${scheme.base00};
margin: 5px 5px 0px; margin: 5px 5px 0px;
padding: 0px; padding: 0px;
border-top: 1px solid ${sc.base04}; border-top: 1px solid ${scheme.base04};
border-radius: 5px; border-radius: 5px;
} }
tooltip { tooltip {
background: alpha(${sc.base00}, ${alpha}); background: alpha(${scheme.base00}, ${alpha});
border: 1px solid ${sc.${accentColourName}}; border: 1px solid ${scheme.base0D};
border-radius: 5px; border-radius: 5px;
box-shadow: none; box-shadow: none;
} }
tooltip label { tooltip label {
color: ${sc.base05}; color: ${scheme.base05};
border: none; border: none;
padding: 5px; padding: 5px;
margin: 0px; margin: 0px;
@ -338,57 +333,57 @@
#backlight, #backlight,
#battery, #battery,
#custom-weather { #custom-weather {
color: ${sc.base05}; color: ${scheme.base05};
} }
#workspaces button { #workspaces button {
background: transparent; background: transparent;
color: ${sc.base05}; color: ${scheme.base05};
margin: 0px; margin: 0px;
padding: 0px 5px; padding: 0px 5px;
} }
#workspaces button.persistent { #workspaces button.persistent {
color: ${sc.base03}; color: ${scheme.base03};
} }
#workspaces button.focused { #workspaces button.focused {
color: ${sc.${accentColourName}}; color: ${scheme.base0D};
} }
#workspaces button.urgent { #workspaces button.urgent {
color: ${sc.base09}; color: ${scheme.base09};
} }
#mpris { #mpris {
color: ${sc.base04}; color: ${scheme.base04};
} }
#custom-notification { #custom-notification {
color: ${sc.base08}; color: ${scheme.base08};
} }
#pulseaudio { #pulseaudio {
color: ${sc.base09}; color: ${scheme.base09};
} }
#network { #network {
color: ${sc.base0A}; color: ${scheme.base0A};
} }
#bluetooth { #bluetooth {
color: ${sc.base0B}; color: ${scheme.base0B};
} }
#clock.calendar { #clock.calendar {
color: ${sc.base0C}; color: ${scheme.base0C};
} }
#clock { #clock {
color: ${sc.base0D}; color: ${scheme.base0D};
} }
#battery.warning { #battery.warning {
color: ${sc.base09}; color: ${scheme.base09};
} }
#battery.critical { #battery.critical {
color: ${sc.base08}; color: ${scheme.base08};
} }
#battery.charging, #battery.charging,
#battery.plugged { #battery.plugged {
color: ${sc.base0B}; color: ${scheme.base0B};
} }
''; '';
}; };