diff --git a/flake.lock b/flake.lock index f1e123b..cd3e4db 100644 --- a/flake.lock +++ b/flake.lock @@ -87,6 +87,22 @@ "type": "github" } }, + "catppuccin-discord": { + "flake": false, + "locked": { + "lastModified": 1768037813, + "narHash": "sha256-ExRNnxvG2PSGmpuaPxzCKL6GK6ETs7Gq4Roa74HXp+s=", + "owner": "catppuccin", + "repo": "discord", + "rev": "0fcfe2e15ed91f8c5f1f3c6855f3b2024f78d86c", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "discord", + "type": "github" + } + }, "flake-compat": { "locked": { "lastModified": 1761640442, @@ -468,6 +484,7 @@ "apple-silicon": "apple-silicon", "base16": "base16", "base16-discord": "base16-discord", + "catppuccin-discord": "catppuccin-discord", "home-manager": "home-manager", "niri": "niri", "niri-blur": "niri-blur", diff --git a/flake.nix b/flake.nix index 6678b60..6d0e6b4 100644 --- a/flake.nix +++ b/flake.nix @@ -73,6 +73,11 @@ url = "gitlab:OpenMW/openmw"; flake = false; }; + + catppuccin-discord = { + url = "github:catppuccin/discord"; + flake = false; + }; }; outputs = @@ -92,6 +97,7 @@ nixvim, apple-silicon, openmw, + catppuccin-discord, ... }: let @@ -135,6 +141,7 @@ nur.overlays.default (final: prev: { openmw-git = openmw; + catppuccin-discord-git = catppuccin-discord; base16-discord-git = base16-discord; }) (import ./packages/overlay.nix) diff --git a/home/apps/discord.nix b/home/apps/discord.nix index f8e3fde..c0c6683 100644 --- a/home/apps/discord.nix +++ b/home/apps/discord.nix @@ -4,9 +4,12 @@ ... }: let + catppuccin-discord = "${pkgs.catppuccin-discord}/share/catppuccin-discord/catppuccin-mocha-*.theme.css"; + mergedThemes = pkgs.runCommand "mergedConfig" { } '' mkdir -p $out - cp ${pkgs.base16-discord-git}/base16.css $out/theme.css + cp -rvf ${pkgs.base16-discord-git}/base16.css $out/base16.css + cp -rvf ${catppuccin-discord} $out ''; vesktopSettings = { diff --git a/home/apps/vencord.nix b/home/apps/vencord.nix index d34c001..eb19434 100644 --- a/home/apps/vencord.nix +++ b/home/apps/vencord.nix @@ -4,7 +4,7 @@ useQuickCss = true; themeLinks = [ ]; eagerPatches = false; - enabledThemes = [ "theme.css" ]; + enabledThemes = [ "base16.css" ]; enableReactDevtools = false; frameless = false; transparent = true; diff --git a/packages/catppuccin-discord/default.nix b/packages/catppuccin-discord/default.nix new file mode 100644 index 0000000..ec4105e --- /dev/null +++ b/packages/catppuccin-discord/default.nix @@ -0,0 +1,56 @@ +{ + lib, + stdenv, + fetchYarnDeps, + yarn, + nodejs, + fixup-yarn-lock, + nodePackages, + catppuccin-discord-git, +}: +stdenv.mkDerivation rec { + pname = "catppuccin-discord"; + version = "unstable-${catppuccin-discord-git.rev}"; + + src = catppuccin-discord-git; + + yarnOfflineCache = fetchYarnDeps { + yarnLock = "${src}/yarn.lock"; + hash = "sha256-BhE3aKyA/LBErjWx+lbEVb/CIXhqHkXbV+9U2djIBhs="; + }; + + nativeBuildInputs = [ + yarn + nodejs + fixup-yarn-lock + nodePackages.sass + ]; + + postPatch = '' + substituteInPlace package.json \ + --replace-fail "--no-charset --no-source-map" "" + ''; + + configurePhase = '' + export HOME=$TMPDIR + yarn config --offline set yarn-offline-mirror ${yarnOfflineCache} + fixup-yarn-lock yarn.lock + yarn install --offline --frozen-lockfile --ignore-scripts --ignore-platform + ''; + + buildPhase = '' + yarn --offline release + ''; + + installPhase = '' + mkdir -p $out/share/catppuccin-discord + cp -r dist/dist/* $out/share/catppuccin-discord/ + ''; + + meta = { + description = "Soothing pastel theme for Discord"; + homepage = "https://github.com/catppuccin/discord"; + license = lib.licenses.mit; + platforms = lib.platforms.all; + }; +} diff --git a/packages/overlay.nix b/packages/overlay.nix index 6cb0e4b..c1fad61 100644 --- a/packages/overlay.nix +++ b/packages/overlay.nix @@ -1,6 +1,10 @@ final: prev: { spotify-webapp = final.callPackage ./spotify-webapp { }; + catppuccin-discord = final.callPackage ./catppuccin-discord { + inherit (final) catppuccin-discord-git; + }; + openmw = prev.openmw.overrideAttrs (oldAttrs: { pname = "openmw"; src = final.openmw-git;