nixcord: init (#767)
Link: https://github.com/danth/stylix/pull/767 Reviewed-by: Daniel Thwaites <danth@danth.me> Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
This commit is contained in:
parent
36c39ff014
commit
e594886eb0
1 changed files with 27 additions and 0 deletions
27
modules/nixcord/hm.nix
Normal file
27
modules/nixcord/hm.nix
Normal file
|
|
@ -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 ];
|
||||
}
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue