2024-11-17 13:41:28 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
systemConfig,
|
|
|
|
...
|
|
|
|
}:
|
2024-11-09 14:02:26 +00:00
|
|
|
{
|
2024-11-08 15:42:15 +00:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
telegram-desktop
|
2024-11-17 10:34:24 +00:00
|
|
|
discord
|
|
|
|
element-desktop
|
2024-11-08 15:42:15 +00:00
|
|
|
];
|
2024-11-17 14:55:58 +00:00
|
|
|
home.persistence.default.directories = [
|
|
|
|
".local/share/TelegramDesktop"
|
|
|
|
".local/share/discord"
|
|
|
|
".local/share/Element"
|
|
|
|
];
|
2024-11-17 13:41:28 +00:00
|
|
|
systemd.user.tmpfiles.rules = lib.mkMerge [
|
|
|
|
[
|
|
|
|
"d /persistent${config.xdg.cacheHome}/TelegramDesktop/cache - - - - -"
|
|
|
|
"d /persistent${config.xdg.cacheHome}/TelegramDesktop/media_cache - - - - -"
|
|
|
|
"d /persistent${config.xdg.cacheHome}/discord - - - - -"
|
|
|
|
"d /persistent${config.xdg.cacheHome}/discord/Cache - - - - -"
|
|
|
|
"d /persistent${config.xdg.cacheHome}/discord/Code\x20Cache - - - - -"
|
|
|
|
"d /persistent${config.xdg.cacheHome}/discord/component_crx_cache - - - - -"
|
|
|
|
"d /persistent${config.xdg.cacheHome}/discord/DawnGraphiteCache - - - - -"
|
|
|
|
"d /persistent${config.xdg.cacheHome}/Element/Cache - - - - -"
|
|
|
|
"d /persistent${config.xdg.cacheHome}/Element/Code\x20Cache - - - - -"
|
|
|
|
"d /persistent${config.xdg.cacheHome}/Element/DawnGraphiteCache - - - - -"
|
|
|
|
"d /persistent${config.xdg.dataHome}/discord - - - - -"
|
|
|
|
"d /persistent${config.xdg.dataHome}/Element - - - - -"
|
|
|
|
"L /persistent${config.xdg.dataHome}/TelegramDesktop/tdata/user_data/cache - - - - ${config.xdg.cacheHome}/TelegramDesktop/cache"
|
|
|
|
"L /persistent${config.xdg.dataHome}/TelegramDesktop/tdata/user_data/media_cache - - - - ${config.xdg.cacheHome}/TelegramDesktop/media_cache"
|
|
|
|
"L /persistent${config.xdg.dataHome}/discord/Cache - - - - ${config.xdg.cacheHome}/discord/Cache"
|
|
|
|
"L /persistent${config.xdg.dataHome}/discord/Code\x20Cache - - - - ${config.xdg.cacheHome}/discord/Code\x20Cache"
|
|
|
|
"L /persistent${config.xdg.dataHome}/discord/component_crx_cache - - - - ${config.xdg.cacheHome}/discord/component_crx_cache"
|
|
|
|
"L /persistent${config.xdg.dataHome}/discord/DawnGraphiteCache - - - - ${config.xdg.cacheHome}/discord/DawnGraphiteCache"
|
|
|
|
"L /persistent${config.xdg.dataHome}/discord/userDataCache.json - - - - ${config.xdg.cacheHome}/discord/userDataCache.json"
|
|
|
|
"L /persistent${config.xdg.dataHome}/Element/Cache - - - - ${config.xdg.cacheHome}/Element/Cache"
|
|
|
|
"L /persistent${config.xdg.dataHome}/Element/Code\x20Cache - - - - ${config.xdg.cacheHome}/Element/Code\x20Cache"
|
|
|
|
"L /persistent${config.xdg.dataHome}/Element/DawnGraphiteCache - - - - ${config.xdg.cacheHome}/Element/DawnGraphiteCache"
|
|
|
|
"L ${config.xdg.configHome}/discord - - - - ${config.xdg.dataHome}/discord"
|
|
|
|
"L ${config.xdg.configHome}/Element - - - - ${config.xdg.dataHome}/Element"
|
|
|
|
]
|
|
|
|
# GPU Cache sometimes breaks for electron apps on intel, so only persist that on non-intel
|
|
|
|
(lib.mkIf (!systemConfig.isIntelGPU) [
|
|
|
|
"d /persistent${config.xdg.cacheHome}/discord/DawnWebGPUCache - - - - -"
|
|
|
|
"d /persistent${config.xdg.cacheHome}/discord/GPUCache - - - - -"
|
|
|
|
"d /persistent${config.xdg.cacheHome}/Element/DawnWebGPUCache - - - - -"
|
|
|
|
"d /persistent${config.xdg.cacheHome}/Element/GPUCache - - - - -"
|
|
|
|
"L /persistent${config.xdg.dataHome}/discord/DawnWebGPUCache - - - - ${config.xdg.cacheHome}/discord/DawnWebGPUCache"
|
|
|
|
"L /persistent${config.xdg.dataHome}/discord/GPUCache - - - - ${config.xdg.cacheHome}/discord/GPUCache"
|
|
|
|
"L /persistent${config.xdg.dataHome}/Element/DawnWebGPUCache - - - - ${config.xdg.cacheHome}/Element/DawnWebGPUCache"
|
|
|
|
"L /persistent${config.xdg.dataHome}/Element/GPUCache - - - - ${config.xdg.cacheHome}/Element/GPUCache"
|
|
|
|
|
|
|
|
])
|
|
|
|
(lib.mkIf (systemConfig.isIntelGPU) [
|
|
|
|
"d /tmp${config.xdg.cacheHome}/discord/DawnWebGPUCache - - - - -"
|
|
|
|
"d /tmp${config.xdg.cacheHome}/discord/GPUCache - - - - -"
|
|
|
|
"d /tmp${config.xdg.cacheHome}/Element/DawnWebGPUCache - - - - -"
|
|
|
|
"d /tmp${config.xdg.cacheHome}/Element/GPUCache - - - - -"
|
|
|
|
"L /persistent${config.xdg.dataHome}/discord/DawnWebGPUCache - - - - /tmp${config.xdg.cacheHome}/discord/DawnWebGPUCache"
|
|
|
|
"L /persistent${config.xdg.dataHome}/discord/GPUCache - - - - /tmp${config.xdg.cacheHome}/discord/GPUCache"
|
|
|
|
"L /persistent${config.xdg.dataHome}/Element/DawnWebGPUCache - - - - /tmp${config.xdg.cacheHome}/Element/DawnWebGPUCache"
|
|
|
|
"L /persistent${config.xdg.dataHome}/Element/GPUCache - - - - /tmp${config.xdg.cacheHome}/Element/GPUCache"
|
|
|
|
])
|
2024-11-09 06:58:47 +00:00
|
|
|
];
|
2024-11-08 15:42:15 +00:00
|
|
|
}
|