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 = {
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 = {
@ -236,6 +219,12 @@
inherit monospace;
serif = proportional;
sansSerif = proportional;
sizes = {
applications = 12;
desktop = 14;
popups = 16;
terminal = 12;
};
};
};
fonts = {

View file

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

View file

@ -1,16 +1,10 @@
{ inputs, osConfig, ... }:
{ inputs, ... }:
{
imports = [
inputs.base16.homeManagerModule
inputs.nix-index-database.hmModules.nix-index
./shell/default.nix
./services/password-store/default.nix
./scripts/default.nix
];
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,
fonts,
...
}:
{ config, pkgs, ... }:
{
imports = [ ../shell/default.nix ];
stylix.targets.emacs.enable = false;
@ -22,9 +17,11 @@
package = pkgs.emacs29-pgtk;
extraConfig =
let
fixed-font-family = "${fonts.monospace.name}";
variable-font-family = "${fonts.sansSerif.name}";
font-height = builtins.toString (builtins.floor (builtins.mul fonts.sizes.applications 10));
fixed-font-family = "${config.stylix.fonts.monospace.name}";
variable-font-family = "${config.stylix.fonts.sansSerif.name}";
font-height = builtins.toString (
builtins.floor (builtins.mul config.stylix.fonts.sizes.applications 10)
);
custom-theme-name = "nix";
custom-theme = pkgs.writeTextFile {
name = "custom-emacs-theme";

View file

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

View file

@ -1,9 +1,4 @@
{
config,
pkgs,
fonts,
...
}:
{ config, pkgs, ... }:
{
home.packages = [ pkgs.yakuake ];
programs.konsole = {
@ -15,8 +10,8 @@
colorScheme = "onelight";
command = "${config.programs.fish.package}/bin/fish";
font = {
name = fonts.monospace.name;
size = fonts.sizes.terminal;
inherit (config.stylix.fonts.monospace) name;
size = config.stylix.fonts.sizes.terminal;
};
extraConfig = {
"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 =
let
rainbow = with config.scheme.withHashtag; [
rainbow = with config.lib.stylix.scheme.withHashtag; [
red
yellow
green
@ -96,5 +96,36 @@
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;
iconTheme = {
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 = {

View file

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