aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaroline Larimore <caroline@larimo.re>2025-02-07 21:21:38 -0800
committerCaroline Larimore <caroline@larimo.re>2025-04-14 18:58:48 -0700
commit11590a875d825c9702caeb1d7dcbd5f07828ce3e (patch)
treeac45df99a94afb1719d471d4471f093de189e177
parentf099add9d8b4255a5756972482b55b9644d7be2e (diff)
migration: discord
-rw-r--r--flake.nix4
-rw-r--r--hosts/c-pc/home.nix6
-rw-r--r--roles/home/desktop/discord.nix41
-rw-r--r--snowfall/homes/x86_64-linux/c/default.nix6
-rw-r--r--snowfall/modules/home/apps/discord/default.nix57
5 files changed, 66 insertions, 48 deletions
diff --git a/flake.nix b/flake.nix
index 4e5e0e1..34ab6c5 100644
--- a/flake.nix
+++ b/flake.nix
@@ -36,5 +36,9 @@
impermanence.nixosModules.impermanence
nix-minecraft.nixosModules.minecraft-servers
];
+
+ channels-config.allowUnfreePredicate = pkg: builtins.elem (inputs.nixpkgs.lib.getName pkg) [
+ "discord"
+ ];
};
}
diff --git a/hosts/c-pc/home.nix b/hosts/c-pc/home.nix
index 8de3b52..3546899 100644
--- a/hosts/c-pc/home.nix
+++ b/hosts/c-pc/home.nix
@@ -23,10 +23,7 @@
".mozilla"
".wine"
- ".irssi"
- ".config/discord"
- ".config/Vencord"
- ".config/vesktop"
+ ".irssi"
".config/Obsidian"
@@ -82,7 +79,6 @@
};
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
- "discord"
"obsidian"
];
diff --git a/roles/home/desktop/discord.nix b/roles/home/desktop/discord.nix
deleted file mode 100644
index d7c0254..0000000
--- a/roles/home/desktop/discord.nix
+++ /dev/null
@@ -1,41 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-let
- conversion = import ../../../util/color-conversion.nix { inherit lib; };
-in lib.mkIf config.home.roles.desktop.discord {
- home.packages = with pkgs; [
- (discord.override {
- withVencord = false;
- withOpenASAR = false;
- })
- vesktop
- ];
-
- xdg.configFile."Vencord/themes/nix.theme.css".text = let c = config.theme.colors; in ''
- @import url(https://mwittrien.github.io/BetterDiscordAddons/Themes/BasicBackground/BasicBackground.css);
-
- :root {
- --transparencycolor: 0, 0, 0;
- --transparencyalpha: 0.0;
- --messagetransparency: 0.0;
- --guildchanneltransparency: 0.15;
- --chatinputtransparency: 0.0;
- --memberlisttransparency: 0.15;
- --settingsicons: 0;
- /* A discord update messed up transparancy, and for now eyeballing it works fine */
- /* --background: rgba(0, 0, 0, 0.8); */
- --background: rgba(0, 0, 0, 0.55);
- --backdrop: rgba(0, 0, 0, 0);
- --version1_0_5: none;
-
- --accentcolor: ${conversion.hexToRGBString ", " c.accent};
-
- --textbrightest: ${conversion.hexToRGBString ", " c.fg0};
- --textbrighter: ${conversion.hexToRGBString ", " c.fg1};
- --textbright: ${conversion.hexToRGBString ", " c.fg2};
- --textdark: ${conversion.hexToRGBString ", " c.fg3};
- --textdarker: ${conversion.hexToRGBString ", " c.fg4};
- --textdarkest: ${conversion.hexToRGBString ", " c.brightBlack};
- }
- '';
-}
diff --git a/snowfall/homes/x86_64-linux/c/default.nix b/snowfall/homes/x86_64-linux/c/default.nix
index aaa2aa5..821f83a 100644
--- a/snowfall/homes/x86_64-linux/c/default.nix
+++ b/snowfall/homes/x86_64-linux/c/default.nix
@@ -1,7 +1,9 @@
-{ lib, namespace, ... }:
+{ config, lib, namespace, ... }:
with lib; with lib.${namespace}; {
cxl = {
+ desktop.background = "shinobu.png";
+
suites = {
common.enable = true;
desktop.enable = true;
@@ -9,7 +11,7 @@ with lib; with lib.${namespace}; {
media.enable = true;
};
- desktop.background = "shinobu.png";
+ apps.discord.enable = true;
tools.git = {
name = "Caroline Larimore";
diff --git a/snowfall/modules/home/apps/discord/default.nix b/snowfall/modules/home/apps/discord/default.nix
new file mode 100644
index 0000000..7766cd8
--- /dev/null
+++ b/snowfall/modules/home/apps/discord/default.nix
@@ -0,0 +1,57 @@
+{ options, config, lib, pkgs, namespace, ... }:
+
+with lib; with lib.${namespace}; let
+ cfg = config.${namespace}.apps.discord;
+ impermanence = config.${namespace}.impermanence;
+ desktop = config.${namespace}.desktop;
+in {
+ options.${namespace}.apps.discord = with types; {
+ enable = mkEnableOption "discord";
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [
+ (discord.override {
+ withVencord = false;
+ withOpenASAR = false;
+ })
+ vesktop
+ ];
+
+ home.persistence.${impermanence.location} = {
+ directories = [
+ ".config/discord"
+ ".config/Vencord"
+ ".config/vesktop"
+ ];
+ };
+
+ xdg.configFile."Vencord/themes/nix.theme.css".text = let c = desktop.theme.colors; in ''
+ @import url(https://mwittrien.github.io/BetterDiscordAddons/Themes/BasicBackground/BasicBackground.css);
+
+ :root {
+ --transparencycolor: 0, 0, 0;
+ --transparencyalpha: 0.0;
+ --messagetransparency: 0.0;
+ --guildchanneltransparency: 0.15;
+ --chatinputtransparency: 0.0;
+ --memberlisttransparency: 0.15;
+ --settingsicons: 0;
+ /* A discord update messed up transparancy, and for now eyeballing it works fine */
+ /* --background: rgba(0, 0, 0, 0.8); */
+ --background: rgba(0, 0, 0, 0.55);
+ --backdrop: rgba(0, 0, 0, 0);
+ --version1_0_5: none;
+
+ --accentcolor: ${hexToRGBString ", " c.accent};
+
+ --textbrightest: ${hexToRGBString ", " c.fg0};
+ --textbrighter: ${hexToRGBString ", " c.fg1};
+ --textbright: ${hexToRGBString ", " c.fg2};
+ --textdark: ${hexToRGBString ", " c.fg3};
+ --textdarker: ${hexToRGBString ", " c.fg4};
+ --textdarkest: ${hexToRGBString ", " c.brightBlack};
+ }
+ '';
+ };
+}