11.stylix/modules/vesktop/hm.nix
Lalit Yalamanchili d6951d0b2f
vesktop: change theme location on nix-darwin (#784)
Link: https://github.com/danth/stylix/pull/784

Reviewed-by: Daniel Thwaites <danth@danth.me>
Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-01-26 04:12:00 +01:00

31 lines
731 B
Nix

{
pkgs,
config,
lib,
...
}:
let
themeFile = config.lib.stylix.colors {
template = ../vencord/template.mustache;
extension = ".css";
};
in
{
options.stylix.targets.vesktop.enable =
config.lib.stylix.mkEnableTarget "Vesktop" true;
config =
lib.mkIf (config.stylix.enable && config.stylix.targets.vesktop.enable)
(
lib.mkMerge [
(lib.mkIf pkgs.stdenv.hostPlatform.isLinux {
xdg.configFile."vesktop/themes/stylix.theme.css".source = themeFile;
})
(lib.mkIf pkgs.stdenv.hostPlatform.isDarwin {
home.file."Library/Application Support/vesktop/themes/stylix.theme.css".source =
themeFile;
})
]
);
}