Skip to content

Commit

Permalink
vencord: init (#768)
Browse files Browse the repository at this point in the history
Initialize the Vencord module and move the Vesktop template into the
Vencord module, as Vesktop is built on top of Vencord.

Closes: #757
Link: #768

Reviewed-by: NAHO <[email protected]>
  • Loading branch information
treierxyz authored Jan 13, 2025
1 parent fb77308 commit 934e2bf
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
17 changes: 17 additions & 0 deletions modules/vencord/hm.nix
Original file line number Diff line number Diff line change
@@ -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;
};
}
File renamed without changes.
21 changes: 21 additions & 0 deletions modules/vencord/testbed.nix
Original file line number Diff line number Diff line change
@@ -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"
];
}
2 changes: 1 addition & 1 deletion modules/vesktop/hm.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ config, lib, ... }:
let
themeFile = config.lib.stylix.colors {
template = ./template.mustache;
template = ../vencord/template.mustache;
extension = ".css";
};
in
Expand Down

0 comments on commit 934e2bf

Please sign in to comment.