diff --git a/modules/vencord/hm.nix b/modules/vencord/hm.nix new file mode 100644 index 00000000..8252c49b --- /dev/null +++ b/modules/vencord/hm.nix @@ -0,0 +1,17 @@ +{ config, lib, ... }: +let + themeFile = config.lib.stylix.colors { + template = ./template.mustache; + extension = ".css"; + }; +in +{ + options.stylix.targets.vencord.enable = + config.lib.stylix.mkEnableTarget "Vencord" true; + + config = + lib.mkIf (config.stylix.enable && config.stylix.targets.vencord.enable) + { + xdg.configFile."Vencord/themes/stylix.theme.css".source = themeFile; + }; +} diff --git a/modules/vesktop/template.mustache b/modules/vencord/template.mustache similarity index 100% rename from modules/vesktop/template.mustache rename to modules/vencord/template.mustache diff --git a/modules/vencord/testbed.nix b/modules/vencord/testbed.nix new file mode 100644 index 00000000..1fcaef05 --- /dev/null +++ b/modules/vencord/testbed.nix @@ -0,0 +1,21 @@ +{ lib, pkgs, ... }: + +let + package = pkgs.discord.override { + withVencord = true; + }; +in +{ + stylix.testbed.application = { + enable = true; + name = "discord"; + inherit package; + }; + + environment.systemPackages = [ package ]; + nixpkgs.config.allowUnfreePredicate = + pkg: + builtins.elem (lib.getName pkg) [ + "discord" + ]; +} diff --git a/modules/vesktop/hm.nix b/modules/vesktop/hm.nix index ded10d52..1633e3dd 100644 --- a/modules/vesktop/hm.nix +++ b/modules/vesktop/hm.nix @@ -1,7 +1,7 @@ { config, lib, ... }: let themeFile = config.lib.stylix.colors { - template = ./template.mustache; + template = ../vencord/template.mustache; extension = ".css"; }; in