From 870745197024128e29c4f461a0e09d36dcf348bb Mon Sep 17 00:00:00 2001 From: brustybee Date: Tue, 10 Mar 2026 01:45:09 +0530 Subject: pretty boy --- common/modules/beevim/default.nix | 39 +-- common/modules/matugen/default.nix | 323 ++++++++++----------- .../modules/matugen/templates/matugen-terminal.nix | 34 +-- 3 files changed, 197 insertions(+), 199 deletions(-) (limited to 'common') diff --git a/common/modules/beevim/default.nix b/common/modules/beevim/default.nix index 2f8336f..49b66c4 100644 --- a/common/modules/beevim/default.nix +++ b/common/modules/beevim/default.nix @@ -22,23 +22,24 @@ in enable = lib.mkEnableOption "Enable neovim config"; }; - config = lib.mkIf (cfg.enable && homeManager) { - beeVim = { - enable = true; - packageDefinitions.replace = builtins.mapAttrs ( - n: _: - { pkgs, ... }: - { - settings = { - neovim-unwrapped = pkgs.neovim-unwrapped; - }; - categories = { - clang = false; - markdown = false; - }; - } - ) inputs.beeVim.packages.${pkgs.stdenv.hostPlatform.system}.default.packageDefinitions; - }; - }; - + config = lib.mkIf cfg.enable ( + lib.optionalAttrs homeManager { + beeVim = { + enable = true; + packageDefinitions.replace = builtins.mapAttrs ( + n: _: + { pkgs, ... }: + { + settings = { + neovim-unwrapped = pkgs.neovim-unwrapped; + }; + categories = { + clang = false; + markdown = false; + }; + } + ) inputs.beeVim.packages.${pkgs.stdenv.hostPlatform.system}.default.packageDefinitions; + }; + } + ); } diff --git a/common/modules/matugen/default.nix b/common/modules/matugen/default.nix index 316ff06..2d1cdc8 100644 --- a/common/modules/matugen/default.nix +++ b/common/modules/matugen/default.nix @@ -34,172 +34,169 @@ in }; config = lib.mkIf cfg.enable ( - if homeManager then - { - programs.wallust = { - enable = true; - settings = { - backend = "wal"; - color_space = "labmixed"; - palette = "dark16"; - fallback_generator = "interpolate"; - threshold = 11; - check_contrast = true; - templates = { - foot = { - template = "foot-colors.ini"; - target = "~/.config/foot/colors.ini"; - }; - alacritty = { - template = "alacritty-colors.toml"; - target = "~/.config/alacritty/colors.toml"; - }; - ghostty = { - template = "ghostty-colors.conf"; - target = "~/.config/ghostty/colors.conf"; - }; - zen = { - template = "userChrome.css"; - target = "~/.cache/wallust/userChrome.css"; - }; - xresources = { - template = "colors-xresources"; - target = "~/.config/x11/matugen.Xresources"; - }; - sequences = { - template = "sequences"; - target = "~/.config/sequences"; - }; + lib.optionalAttrs homeManager { + programs.wallust = { + enable = true; + settings = { + backend = "wal"; + color_space = "labmixed"; + palette = "dark16"; + fallback_generator = "interpolate"; + threshold = 11; + check_contrast = true; + templates = { + foot = { + template = "foot-colors.ini"; + target = "~/.config/foot/colors.ini"; + }; + alacritty = { + template = "alacritty-colors.toml"; + target = "~/.config/alacritty/colors.toml"; + }; + ghostty = { + template = "ghostty-colors.conf"; + target = "~/.config/ghostty/colors.conf"; + }; + zen = { + template = "userChrome.css"; + target = "~/.cache/wallust/userChrome.css"; + }; + xresources = { + template = "colors-xresources"; + target = "~/.config/x11/matugen.Xresources"; + }; + sequences = { + template = "sequences"; + target = "~/.config/sequences"; }; }; }; - - home.packages = with pkgs; [ - matugen - ]; - - xdg.configFile = { - "matugen/config.toml" = { - # enable = !config.programs.noctalia-shell.enable; - text = - # toml - '' - [config] - ${lib.optionalString config.beeMods.terminal.alacritty '' - [templates.alacritty] - input_path = '~/.config/matugen/templates/alacritty-colors.toml' - output_path = '~/.config/wallust/templates/alacritty-colors.toml' - ''} - - ${lib.optionalString config.beeMods.terminal.foot '' - [templates.foot] - input_path = '~/.config/matugen/templates/foot-colors.ini' - output_path = '~/.config/wallust/templates/foot-colors.ini' - ''} - - ${lib.optionalString config.beeMods.terminal.ghostty '' - [templates.ghostty] - input_path = '~/.config/matugen/templates/ghostty.conf' - output_path = '~/.config/wallust/templates/ghostty-colors.conf' - ''} - - ${lib.optionalString config.programs.zathura.enable '' - [templates.zathura] - input_path = '~/.config/matugen/templates/zathura.toml' - output_path = '~/.config/zathura/matugen' - ''} - - ${lib.optionalString config.programs.swaylock.enable '' - [templates.swaylock] - input_path = '~/.config/matugen/templates/swaylock-colors' - output_path = '~/.config/swaylock/swaylock-colors' - ''} - - ${lib.optionalString config.beeMods.mango.enable '' - [templates.mango] - input_path = '~/.config/matugen/templates/mango.conf' - output_path = '~/.config/mango/mango-colors.conf' - post_hook = 'mmsg -d reload_config' - ''} - - ${lib.optionalString config.programs.btop.enable '' - [templates.btop] - input_path = '~/.config/matugen/templates/btop.theme' - output_path = '~/.config/btop/themes/matugen.theme' - ''} - - ${lib.optionalString config.programs.yazi.enable '' - [templates.yazi] - input_path = '~/.config/matugen/templates/yazi.toml' - output_path = '~/.config/yazi/theme.toml' - ''} - - - ${lib.optionalString config.beeMods.mango.enable '' - [templates.Xresources] - input_path = "~/.config/matugen/templates/colors-xresources" - output_path = "~/.config/wallust/templates/colors-xresources" - ''} - - - ${lib.optionalString config.programs.vesktop.enable '' - [templates.vesktop] - input_path = "~/.config/matugen/templates/vesktop.css" - output_path = "~/.config/vesktop/themes/midnight.css" - ''} - - ${lib.optionalString config.beeMods.mango.waybar '' - [templates.waybar] - input_path = "~/.config/matugen/templates/waybar.css" - output_path = "~/.config/waybar/colors.css" - # post_hook = "pkill -SIGUSR2 waybar" - ''} - - [templates.wlogout] - input_path = "~/.config/matugen/templates/wlogout.css" - output_path = "~/.config/wlogout/colors.css" - - ${lib.optionalString config.services.dunst.enable '' - [templates.dunst] - input_path = '~/.config/matugen/templates/dunstrc' - output_path = '~/.config/dunst/dunstrc.d/colors.conf' - post_hook = "dunstctl reload" - ''} - - ${lib.optionalString config.programs.rofi.enable '' - [templates.rofi] - input_path = '~/.config/matugen/templates/rofi-colors.rasi' - output_path = '~/.config/rofi/shared/colors.rasi' - ''} - - ${lib.optionalString config.gtk.enable '' - [templates.gtk3] - input_path = '~/.config/matugen/templates/colors.css' - output_path = '~/.config/gtk-3.0/colors.css' - - [templates.gtk4] - input_path = '~/.config/matugen/templates/colors.css' - output_path = '~/.config/gtk-4.0/colors.css' - post_hook = "${update_gtkcolors}" - ''} - - [templates.zed] - input_path = '~/.config/matugen/templates/zed.json' - output_path = '~/.config/zed/themes/matugen.json' - - [templates.sequences] - input_path = '~/.config/matugen/templates/sequences' - output_path = '~/.config/wallust/templates/sequences' - - [templates.zen] - input_path = '~/.config/matugen/templates/zen.css' - output_path = '~/.config/wallust/templates/userChrome.css' - post_hook = "${link_zen}" - ''; - }; + }; + + home.packages = with pkgs; [ + matugen + ]; + + xdg.configFile = { + "matugen/config.toml" = { + # enable = !config.programs.noctalia-shell.enable; + text = + # toml + '' + [config] + ${lib.optionalString config.beeMods.terminal.alacritty '' + [templates.alacritty] + input_path = '~/.config/matugen/templates/alacritty-colors.toml' + output_path = '~/.config/wallust/templates/alacritty-colors.toml' + ''} + + ${lib.optionalString config.beeMods.terminal.foot '' + [templates.foot] + input_path = '~/.config/matugen/templates/foot-colors.ini' + output_path = '~/.config/wallust/templates/foot-colors.ini' + ''} + + ${lib.optionalString config.beeMods.terminal.ghostty '' + [templates.ghostty] + input_path = '~/.config/matugen/templates/ghostty.conf' + output_path = '~/.config/wallust/templates/ghostty-colors.conf' + ''} + + ${lib.optionalString config.programs.zathura.enable '' + [templates.zathura] + input_path = '~/.config/matugen/templates/zathura.toml' + output_path = '~/.config/zathura/matugen' + ''} + + ${lib.optionalString config.programs.swaylock.enable '' + [templates.swaylock] + input_path = '~/.config/matugen/templates/swaylock-colors' + output_path = '~/.config/swaylock/swaylock-colors' + ''} + + ${lib.optionalString config.beeMods.mango.enable '' + [templates.mango] + input_path = '~/.config/matugen/templates/mango.conf' + output_path = '~/.config/mango/mango-colors.conf' + post_hook = 'mmsg -d reload_config' + ''} + + ${lib.optionalString config.programs.btop.enable '' + [templates.btop] + input_path = '~/.config/matugen/templates/btop.theme' + output_path = '~/.config/btop/themes/matugen.theme' + ''} + + ${lib.optionalString config.programs.yazi.enable '' + [templates.yazi] + input_path = '~/.config/matugen/templates/yazi.toml' + output_path = '~/.config/yazi/theme.toml' + ''} + + + ${lib.optionalString config.beeMods.mango.enable '' + [templates.Xresources] + input_path = "~/.config/matugen/templates/colors-xresources" + output_path = "~/.config/wallust/templates/colors-xresources" + ''} + + + ${lib.optionalString config.programs.vesktop.enable '' + [templates.vesktop] + input_path = "~/.config/matugen/templates/vesktop.css" + output_path = "~/.config/vesktop/themes/midnight.css" + ''} + + ${lib.optionalString config.beeMods.mango.waybar '' + [templates.waybar] + input_path = "~/.config/matugen/templates/waybar.css" + output_path = "~/.config/waybar/colors.css" + # post_hook = "pkill -SIGUSR2 waybar" + ''} + + [templates.wlogout] + input_path = "~/.config/matugen/templates/wlogout.css" + output_path = "~/.config/wlogout/colors.css" + + ${lib.optionalString config.services.dunst.enable '' + [templates.dunst] + input_path = '~/.config/matugen/templates/dunstrc' + output_path = '~/.config/dunst/dunstrc.d/colors.conf' + post_hook = "dunstctl reload" + ''} + + ${lib.optionalString config.programs.rofi.enable '' + [templates.rofi] + input_path = '~/.config/matugen/templates/rofi-colors.rasi' + output_path = '~/.config/rofi/shared/colors.rasi' + ''} + + ${lib.optionalString config.gtk.enable '' + [templates.gtk3] + input_path = '~/.config/matugen/templates/colors.css' + output_path = '~/.config/gtk-3.0/colors.css' + + [templates.gtk4] + input_path = '~/.config/matugen/templates/colors.css' + output_path = '~/.config/gtk-4.0/colors.css' + post_hook = "${update_gtkcolors}" + ''} + + [templates.zed] + input_path = '~/.config/matugen/templates/zed.json' + output_path = '~/.config/zed/themes/matugen.json' + + [templates.sequences] + input_path = '~/.config/matugen/templates/sequences' + output_path = '~/.config/wallust/templates/sequences' + + [templates.zen] + input_path = '~/.config/matugen/templates/zen.css' + output_path = '~/.config/wallust/templates/userChrome.css' + post_hook = "${link_zen}" + ''; }; - } - else - { } + }; + } ); } diff --git a/common/modules/matugen/templates/matugen-terminal.nix b/common/modules/matugen/templates/matugen-terminal.nix index ae8cd79..d8ee733 100644 --- a/common/modules/matugen/templates/matugen-terminal.nix +++ b/common/modules/matugen/templates/matugen-terminal.nix @@ -8,30 +8,30 @@ (lib.mkIf config.beeMods.terminal.foot { xdg.configFile."matugen/templates/foot-colors.ini" = { text = '' - [colors] + [colors-dark] foreground={{colors.on_surface.default.hex_stripped}} background={{colors.background.default.hex_stripped}} selection-foreground={{colors.on_surface.default.hex_stripped}} selection-background={{colors.primary_container.default.hex_stripped}} cursor = {{colors.background.default.hex_stripped}} {{colors.primary.default.hex_stripped}} - regular0=\{{color0[1:]}} - regular1=\{{color1[1:]}} - regular2=\{{color2[1:]}} - regular3=\{{color3[1:]}} - regular4=\{{color4[1:]}} - regular5=\{{color5[1:]}} - regular6=\{{color6[1:]}} - regular7=\{{color7[1:]}} + regular0=\{{color0[1:]}} + regular1=\{{color1[1:]}} + regular2=\{{color2[1:]}} + regular3=\{{color3[1:]}} + regular4=\{{color4[1:]}} + regular5=\{{color5[1:]}} + regular6=\{{color6[1:]}} + regular7=\{{color7[1:]}} - bright0=\{{color8[1:]}} - bright1=\{{color9[1:]}} - bright2=\{{color10[1:]}} - bright3=\{{color11[1:]}} - bright4=\{{color12[1:]}} - bright5=\{{color13[1:]}} - bright6=\{{color14[1:]}} - bright7=\{{color15[1:]}} + bright0=\{{color8[1:]}} + bright1=\{{color9[1:]}} + bright2=\{{color10[1:]}} + bright3=\{{color11[1:]}} + bright4=\{{color12[1:]}} + bright5=\{{color13[1:]}} + bright6=\{{color14[1:]}} + bright7=\{{color15[1:]}} dim-blend-towards=<* if {{ is_dark_mode }} *>black<* else *>white<* endif *> -- cgit v1.3.1