1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-10 16:03:52 +00:00
ultima/modules/home/themes/stylix/default.nix

89 lines
2.2 KiB
Nix
Raw Normal View History

2024-12-09 01:15:55 +00:00
{ x, pkgs, lib, config, inputs, True, False, ... }:
2024-11-21 09:24:15 +00:00
with lib;
2024-12-09 01:15:55 +00:00
with x;
2024-11-21 09:24:15 +00:00
let
cfg = config.module.themes.stylix;
2024-11-24 08:17:07 +00:00
wal = inputs.design;
2024-11-21 09:24:15 +00:00
in {
options = {
module.themes.stylix = {
2024-12-09 01:15:55 +00:00
enable = mkBool;
theme = mkOpt.str;
image = mkOpt.str;
2024-11-27 10:37:54 +00:00
cursor = {
2024-12-09 01:15:55 +00:00
bg = mkOpt.str;
ol = mkOpt.str;
ac = mkOpt.str;
2024-11-27 10:37:54 +00:00
};
2024-11-21 09:24:15 +00:00
};
};
2024-12-05 14:36:13 +00:00
imports = with inputs; [
stylix.homeManagerModules.stylix
../../../colors.nix
];
2024-11-21 09:24:15 +00:00
config = mkIf cfg.enable {
2024-12-05 14:36:13 +00:00
stylix = True // {
autoEnable = false;
image = "${wal}/wallpapers/paradise/${cfg.image}.jpg";
cursor = with inputs.cursors; {
size = 16;
name = "GoogleDot-Custom";
package = packages.${pkgs.system}.google-cursor.override {
background_color = cfg.cursor.bg;
outline_color = cfg.cursor.ol;
accent_color = cfg.cursor.ac;
2024-12-03 14:20:37 +00:00
};
2024-12-05 14:36:13 +00:00
};
fonts = let
2024-12-09 01:15:55 +00:00
jetBrains = { name = "JetBrainsMono Nerd Font"; };
package = with pkgs.nerd-fonts;
(jetbrains-mono.overrideAttrs (oldAttrs: {
installPhase = ''
runHook preInstall
dst_opentype=$out/share/fonts/opentype/NerdFonts
dst_truetype=$out/share/fonts/truetype/NerdFonts
find -name \*.otf -exec mkdir -p $dst_opentype \; -exec cp -p {} $dst_opentype \;
find -name \*.ttf -exec mkdir -p $dst_truetype \; -exec cp -p {} $dst_truetype \;
runHook postInstall
'';
}));
in with config.stylix.fonts; {
monospace = jetBrains // { inherit package; };
serif = monospace;
emoji = monospace;
2024-12-05 14:36:13 +00:00
sizes = {
desktop = 10;
popups = 10;
applications = 12;
terminal = 12;
2024-11-21 09:24:15 +00:00
};
};
2024-12-05 14:36:13 +00:00
targets = {
# CLI
tmux = True;
fish = True;
nushell = True;
# WM
hyprland = True;
sway = True;
foot = True;
kitty = True;
mako = False;
# TOOLS
nixvim = True;
yazi = True;
fzf = True;
bat = True;
mangohud = True;
# GUI
vesktop = True;
qutebrowser = True;
firefox = True;
gtk = True;
};
};
2024-11-21 09:24:15 +00:00
};
}