nixos-config/modules/home/discord/default.nix

38 lines
1.1 KiB
Nix
Raw Normal View History

2023-11-11 18:40:21 +01:00
{ pkgs, lib, ... }:
2023-11-11 18:34:59 +01:00
{
home.packages = with pkgs; [
2023-11-11 18:46:36 +01:00
discord
2023-11-11 18:34:59 +01:00
webcord
2023-11-11 18:43:21 +01:00
webcord-vencord
2023-11-11 18:34:59 +01:00
];
2023-11-11 18:40:21 +01:00
nixpkgs.overlays = [
(_final: prev: {
webcord-vencord = prev.webcord-vencord.override {
# Patch webcord
webcord = prev.webcord.overrideAttrs (old: {
patches = (old.patches or []) ++ [./webcord/unwritable-config.patch];
});
2023-11-11 18:34:59 +01:00
2023-11-11 18:40:21 +01:00
# Patch vencord
vencord-web-extension = prev.vencord-web-extension.overrideAttrs (old: {
patches =
(old.patches or [])
++ [
(prev.runCommand "vencord-settings-patch" {
nativeBuildInputs = with prev; [jq];
} ''
export settings=$(jq -c '.settings' < ${./vencord/exported-settings.json})
substituteAll ${./vencord/declarative-settings.patch} $out
'')
];
});
};
})
];
2023-11-11 18:34:59 +01:00
xdg.configFile."WebCord/Themes/amoled-cord".source = pkgs.substituteAll {
2023-11-11 18:37:00 +01:00
src = ./themes/theme.css;
2023-11-11 18:34:59 +01:00
};
xdg.configFile."WebCord/config.json".source = ./webcord/config.json;
}