1
Fork 0
satellite/home/features/desktop/discord/default.nix

37 lines
1,023 B
Nix
Raw Normal View History

{ config, pkgs, ... }:
let
themeMap = pkgs.callPackage (import ./themes.nix) { };
2023-09-04 04:58:39 +02:00
2024-04-01 05:57:56 +02:00
# REASON: newer discord versions don't work with the one in nixpkgs
2023-09-04 04:58:39 +02:00
discocss = pkgs.discocss.overrideAttrs (old: rec {
2024-05-01 04:35:50 +02:00
version = "unstable-2023-09-02";
2023-09-04 04:58:39 +02:00
src = pkgs.fetchFromGitHub {
owner = "bddvlpr";
repo = "discocss";
2024-05-01 04:35:50 +02:00
rev = "37f1520bc90822b35e60baa9036df7a05f43fab8";
sha256 = "1559mxmc0ppl4jxvdzszphysp1j31k2hm93qv7yz87xn9j0z2m04";
2023-09-04 04:58:39 +02:00
};
});
in
{
programs.discord = {
enable = true;
disableUpdateCheck = true;
2023-03-12 05:24:25 +01:00
enableDevtools = true;
};
2023-04-27 01:08:20 +02:00
2023-09-04 04:58:39 +02:00
home.packages = [ discocss ];
xdg.configFile."discocss/custom.css".source = config.satellite.theming.get themeMap;
# {{{ Storage
# Clean cache older than 10 days
systemd.user.tmpfiles.rules = [
"d ${config.xdg.configHome}/discord/Cache/Cache_Data - - - 10d"
];
satellite.persistence.at.state.apps.discord.directories = [
2023-04-30 04:30:15 +02:00
"${config.xdg.configHome}/discord" # Why tf does discord store it's state here 💀
2023-04-27 01:08:20 +02:00
];
# }}}
}