Files
nix-config/modules/programs/matugen/matugen.nix
T
2026-04-25 23:34:21 +05:00

97 lines
2.7 KiB
Nix

{ self, ... }:
{
flake.nixosModules.matugen = { pkgs, lib, ... }:
{
imports = [
self.nixosModules.bash
];
home-manager.users.${self.user}.imports = [
{
home.activation = {
matugen = ''
${pkgs.matugen}/bin/matugen image ${self.wallpaper} --source-color-index 0
'';
};
home.packages = with pkgs; [
matugen
kdePackages.breeze
kdePackages.qt6ct
killall
libsForQt5.qt5ct
];
xdg.configFile = {
"matugen/config.toml" = {
text = /* toml */ ''
[config]
[templates.gtk3]
input_path = '${builtins.toString ./templates/gtk-colors.css}'
output_path = '~/.config/gtk-3.0/colors.css'
[templates.gtk4]
input_path = '${builtins.toString ./templates/gtk-colors.css}'
output_path = '~/.config/gtk-4.0/colors.css'
[templates.color-scheme]
input_path = '${builtins.toString ./templates/Matugen.colors}'
output_path = '~/.local/share/color-schemes/Matugen.colors'
[templates.qt5ct]
input_path = '${builtins.toString ./templates/qtct-colors.conf}'
output_path = '~/.config/qt5ct/colors/matugen.conf'
[templates.qt6ct]
input_path = '${builtins.toString ./templates/qtct-colors.conf}'
output_path = '~/.config/qt6ct/colors/matugen.conf'
[templates.niri]
input_path = '${builtins.toString ./templates/niri-colors.kdl}'
output_path = '~/.config/niri/colors.kdl'
# post_hook = 'niri msg action load-config-file'
[templates.dunst]
input_path = '${builtins.toString ./templates/dunstrc-colors}'
output_path = '~/.config/dunst/dunstrc.d/00-style.conf'
post_hook = 'dunstctl reload'
'';
};
"kdeglobals" = {
text = ''
[UiSettings]
ColorScheme=Matugen
'';
};
};
qt = {
enable = true;
platformTheme.name = lib.mkForce "qt6ct";
qt5ctSettings = {
Appearance = {
color_scheme_path = "/home/${self.user}/.config/qt5ct/colors/matugen.conf";
custom_palette = true;
};
};
qt6ctSettings = {
Appearance = {
color_scheme_path = "/home/${self.user}/.config/qt5ct/colors/matugen.conf";
custom_palette = true;
};
};
};
gtk = {
enable = true;
gtk4.extraCss = "@import 'colors.css';";
gtk3.extraCss = "@import 'colors.css';";
};
}
];
};
}