Reorganize imports
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
73
hosts/common/configs/user/gui/discord/default.nix
Normal file
73
hosts/common/configs/user/gui/discord/default.nix
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
vesktop = prev.vesktop.overrideAttrs (oldAttrs: {
|
||||
patches = oldAttrs.patches or [ ] ++ [ ./readonly-fix.patch ];
|
||||
});
|
||||
})
|
||||
];
|
||||
|
||||
environment.persistence = {
|
||||
"/persist"."${home}/.config/vesktop" = { };
|
||||
"/cache" = {
|
||||
"${home}/.config/vesktop/sessionData/Cache" = { };
|
||||
"${home}/.config/vesktop/sessionData/Code Cache" = { };
|
||||
"${home}/.config/vesktop/sessionData/DawnGraphiteCache" = { };
|
||||
"${home}/.config/vesktop/sessionData/DawnWebGPUCache" = { };
|
||||
"${home}/.config/vesktop/sessionData/GPUCache" = { };
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.${user} = {
|
||||
home.packages = with pkgs; [ vesktop ];
|
||||
|
||||
xdg.configFile."vesktop/state.json".source = (pkgs.formats.json { }).generate "state.json" {
|
||||
firstLaunch = false;
|
||||
};
|
||||
|
||||
xdg.configFile."vesktop/settings.json".source = (pkgs.formats.json { }).generate "settings.json" {
|
||||
discordBranch = "stable";
|
||||
minimizeToTray = false;
|
||||
arRPC = false;
|
||||
};
|
||||
|
||||
xdg.configFile."vesktop/settings/settings.json".source =
|
||||
(pkgs.formats.json { }).generate "settings.json"
|
||||
{
|
||||
autoUpdate = false;
|
||||
tray = false;
|
||||
plugins = {
|
||||
MessageEventsAPI.enabled = true;
|
||||
MessageUpdaterAPI.enabled = true;
|
||||
UserSettingsAPI.enabled = true;
|
||||
AlwaysTrust.enabled = true;
|
||||
BetterGifAltText.enabled = true;
|
||||
BetterRoleContext = {
|
||||
enabled = true;
|
||||
roleIconFileFormat = "png";
|
||||
};
|
||||
ClearURLs.enabled = true;
|
||||
FakeNitro.enabled = true;
|
||||
MessageClickActions.enabled = true;
|
||||
MessageLogger = {
|
||||
enabled = true;
|
||||
deleteStyle = "overlay";
|
||||
};
|
||||
NoF1.enabled = true;
|
||||
NoOnboardingDelay.enabled = true;
|
||||
NoReplyMention = {
|
||||
enabled = true;
|
||||
userList = "";
|
||||
};
|
||||
};
|
||||
enabledThemes = [ "matugen.theme.css" ];
|
||||
};
|
||||
|
||||
theme.template."${home}/.config/vesktop/themes/matugen.theme.css".source = ./theme.css;
|
||||
};
|
||||
}
|
17
hosts/common/configs/user/gui/discord/readonly-fix.patch
Normal file
17
hosts/common/configs/user/gui/discord/readonly-fix.patch
Normal file
@@ -0,0 +1,17 @@
|
||||
diff --git a/src/main/settings.ts b/src/main/settings.ts
|
||||
index 6fad97f..dfc64e3 100644
|
||||
--- a/src/main/settings.ts
|
||||
+++ b/src/main/settings.ts
|
||||
@@ -26,8 +26,10 @@ function loadSettings<T extends object = any>(file: string, name: string) {
|
||||
|
||||
const store = new SettingsStore(settings);
|
||||
store.addGlobalChangeListener(o => {
|
||||
- mkdirSync(dirname(file), { recursive: true });
|
||||
- writeFileSync(file, JSON.stringify(o, null, 4));
|
||||
+ try {
|
||||
+ mkdirSync(dirname(file), { recursive: true });
|
||||
+ writeFileSync(file, JSON.stringify(o, null, 4));
|
||||
+ } catch {}
|
||||
});
|
||||
|
||||
return store;
|
76
hosts/common/configs/user/gui/discord/theme.css
Normal file
76
hosts/common/configs/user/gui/discord/theme.css
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
@name Matugen
|
||||
@author Matugen
|
||||
@version 0.0.1
|
||||
@description Theme configured via NixOS or Home Manager.
|
||||
*/
|
||||
|
||||
.theme-dark {
|
||||
--bg-overlay-2: {{colors.surface_container_high.dark.hex}};
|
||||
--home-background: {{colors.surface_container_high.dark.hex}};
|
||||
--background-primary: {{colors.surface_container_high.dark.hex}};
|
||||
|
||||
--background-secondary: {{colors.surface_container.dark.hex}};
|
||||
--background-secondary-alt: {{colors.surface_container.dark.hex}};
|
||||
--background-accent: {{colors.surface_container.dark.hex}};
|
||||
--background-modifier-hover: {{colors.surface_container.dark.hex}};
|
||||
|
||||
--background-tertiary: {{colors.surface_container_low.dark.hex}};
|
||||
--background-floating: {{colors.surface_container_low.dark.hex}};
|
||||
|
||||
--background-modifier-selected: {{colors.primary_container.dark.hex}};
|
||||
--background-modifier-accent: {{colors.outline_variant.dark.hex}};
|
||||
|
||||
--channeltextarea-background: {{colors.surface_container.dark.hex}};
|
||||
|
||||
--text-normal: {{colors.on_surface.dark.hex}};
|
||||
--text-secondary: {{colors.on_surface_variant.dark.hex}};
|
||||
--text-muted: {{colors.outline.dark.hex}};
|
||||
--text-link: {{colors.primary.dark.hex}};
|
||||
|
||||
--interactive-normal: {{colors.on_surface.dark.hex}};
|
||||
--interactive-hover: {{colors.on_surface.dark.hex}};
|
||||
--interactive-active: {{colors.on_primary_container.dark.hex}};
|
||||
--interactive-muted: {{colors.outline_variant.dark.hex}};
|
||||
|
||||
--channels-default: {{colors.outline.dark.hex}};
|
||||
--channel-icon: {{colors.outline.dark.hex}};
|
||||
|
||||
--header-primary: {{colors.on_surface.dark.hex}};
|
||||
--header-secondary: {{colors.on_surface_variant.dark.hex}};
|
||||
}
|
||||
|
||||
.theme-light {
|
||||
--bg-overlay-2: {{colors.surface_container_high.light.hex}};
|
||||
--home-background: {{colors.surface_container_high.light.hex}};
|
||||
--background-primary: {{colors.surface_container_high.light.hex}};
|
||||
|
||||
--background-secondary: {{colors.surface_container.light.hex}};
|
||||
--background-secondary-alt: {{colors.surface_container.light.hex}};
|
||||
--background-accent: {{colors.surface_container.light.hex}};
|
||||
--background-modifier-hover: {{colors.surface_container.light.hex}};
|
||||
|
||||
--background-tertiary: {{colors.surface_container_low.light.hex}};
|
||||
--background-floating: {{colors.surface_container_low.light.hex}};
|
||||
|
||||
--background-modifier-selected: {{colors.primary_container.light.hex}};
|
||||
--background-modifier-accent: {{colors.outline_variant.light.hex}};
|
||||
|
||||
--channeltextarea-background: {{colors.surface_container.light.hex}};
|
||||
|
||||
--text-normal: {{colors.on_surface.light.hex}};
|
||||
--text-secondary: {{colors.on_surface_variant.light.hex}};
|
||||
--text-muted: {{colors.outline.light.hex}};
|
||||
--text-link: {{colors.primary.light.hex}};
|
||||
|
||||
--interactive-normal: {{colors.on_surface.light.hex}};
|
||||
--interactive-hover: {{colors.on_surface.light.hex}};
|
||||
--interactive-active: {{colors.on_primary_container.light.hex}};
|
||||
--interactive-muted: {{colors.outline_variant.light.hex}};
|
||||
|
||||
--channels-default: {{colors.outline.light.hex}};
|
||||
--channel-icon: {{colors.outline.light.hex}};
|
||||
|
||||
--header-primary: {{colors.on_surface.light.hex}};
|
||||
--header-secondary: {{colors.on_surface_variant.light.hex}};
|
||||
}
|
Reference in New Issue
Block a user