Skip to content

Commit

Permalink
nixcord: init (#767)
Browse files Browse the repository at this point in the history
Link: #767

Reviewed-by: Daniel Thwaites <[email protected]>
Reviewed-by: NAHO <[email protected]>
  • Loading branch information
ari-rs authored Jan 23, 2025
1 parent 36c39ff commit e594886
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions modules/nixcord/hm.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
config,
lib,
options,
...
}:
let
themeFile = config.lib.stylix.colors {
template = ../vencord/template.mustache;
extension = ".css";
};
themeFileName = "stylix.theme.css";
cfg = config.stylix.targets.nixcord;
in
{
options.stylix.targets.nixcord.enable =
config.lib.stylix.mkEnableTarget "Nixcord" true;

config =
lib.mkIf (config.stylix.enable && cfg.enable && (config.programs ? nixcord))
(
lib.optionalAttrs (builtins.hasAttr "nixcord" options.programs) {
xdg.configFile."Vencord/themes/stylix.theme.css".source = themeFile;
programs.nixcord.config.enabledThemes = [ themeFileName ];
}
);
}

0 comments on commit e594886

Please sign in to comment.