cab752b0f0
* feat(home-manager/hyprland): source theme + accent Since Home Manager defbb9c, Hyprland on Home Manager now sources files before most other configuration, meaning Catppuccin Nix can now source a theme colors file instead of inserting them into the main configuration. In addition, `accent` and `accentAlpha` color variables have been added in a second sourced file. * chore(home-manager): format hyprland.nix --------- Co-authored-by: Liassica <git-commit.jingle869@aleeas.com> Co-authored-by: seth <getchoo@tuta.io>
24 lines
619 B
Nix
24 lines
619 B
Nix
{ config
|
|
, lib
|
|
, sources
|
|
, ...
|
|
}:
|
|
let
|
|
cfg = config.wayland.windowManager.hyprland.catppuccin;
|
|
enable = cfg.enable && config.wayland.windowManager.hyprland.enable;
|
|
in
|
|
{
|
|
options.wayland.windowManager.hyprland.catppuccin = lib.ctp.mkCatppuccinOpt "hyprland" // {
|
|
accent = lib.ctp.mkAccentOpt "hyprland";
|
|
};
|
|
|
|
config.wayland.windowManager.hyprland.settings = lib.mkIf enable {
|
|
source = [
|
|
"${sources.hyprland}/themes/${cfg.flavour}.conf"
|
|
(builtins.toFile "hyprland-${cfg.accent}-accent.conf" ''
|
|
$accent=''$${cfg.accent}
|
|
$accentAlpha=''$${cfg.accent}Alpha
|
|
'')
|
|
];
|
|
};
|
|
}
|