nixcord: add Equibop and Equicord support (#2016)
Link: https://github.com/nix-community/stylix/pull/2016 Reviewed-by: 0xda157 <da157@voidq.com> Tested-by: https://github.com/pastadudes Reviewed-by: Flameopathic <flameopathic@gmail.com>
This commit is contained in:
parent
adc6506100
commit
b5072c5130
1 changed files with 18 additions and 25 deletions
|
|
@ -28,38 +28,31 @@ mkTarget {
|
|||
{ cfg }:
|
||||
let
|
||||
inherit (config.programs) nixcord;
|
||||
|
||||
writePath =
|
||||
name:
|
||||
lib.mkMerge [
|
||||
(lib.mkIf (!pkgs.stdenv.hostPlatform.isDarwin || config.xdg.enable) {
|
||||
xdg.configFile."${name}/themes/stylix.theme.css".text =
|
||||
cfg.themeBody + cfg.extraCss;
|
||||
})
|
||||
(lib.mkIf (pkgs.stdenv.hostPlatform.isDarwin && !config.xdg.enable) {
|
||||
home.file."Library/Application Support/${name}/themes/stylix.theme.css".text =
|
||||
cfg.themeBody + cfg.extraCss;
|
||||
})
|
||||
];
|
||||
in
|
||||
lib.mkIf
|
||||
(cfg.themeBody != (import ./common/theme-header.nix) || cfg.extraCss != "")
|
||||
(
|
||||
lib.optionalAttrs (options.programs ? nixcord) (
|
||||
lib.mkMerge [
|
||||
(lib.mkIf nixcord.discord.enable (
|
||||
lib.mkMerge [
|
||||
(lib.mkIf (!pkgs.stdenv.hostPlatform.isDarwin || config.xdg.enable) {
|
||||
xdg.configFile."Vencord/themes/stylix.theme.css".text =
|
||||
cfg.themeBody + cfg.extraCss;
|
||||
})
|
||||
|
||||
(lib.mkIf (pkgs.stdenv.hostPlatform.isDarwin && !config.xdg.enable) {
|
||||
home.file."Library/Application Support/Vencord/themes/stylix.theme.css".text =
|
||||
cfg.themeBody + cfg.extraCss;
|
||||
})
|
||||
]
|
||||
))
|
||||
(lib.mkIf nixcord.vesktop.enable (
|
||||
lib.mkMerge [
|
||||
(lib.mkIf (!pkgs.stdenv.hostPlatform.isDarwin || config.xdg.enable) {
|
||||
xdg.configFile."vesktop/themes/stylix.theme.css".text =
|
||||
cfg.themeBody + cfg.extraCss;
|
||||
})
|
||||
|
||||
(lib.mkIf (pkgs.stdenv.hostPlatform.isDarwin && !config.xdg.enable) {
|
||||
home.file."Library/Application Support/vesktop/themes/stylix.theme.css".text =
|
||||
cfg.themeBody + cfg.extraCss;
|
||||
})
|
||||
]
|
||||
(lib.mkIf nixcord.discord.enable (writePath "Vencord"))
|
||||
(lib.mkIf nixcord.vesktop.enable (writePath "vesktop"))
|
||||
(lib.mkIf (nixcord.discord.equicord.enable && nixcord.discord.enable) (
|
||||
writePath "Equicord"
|
||||
))
|
||||
(lib.mkIf nixcord.equibop.enable (writePath "equibop"))
|
||||
{
|
||||
programs.nixcord.config.enabledThemes = [ "stylix.theme.css" ];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue