move all url fetches into main flake

This commit is contained in:
Sean Kovacs 2026-01-15 22:39:47 -05:00
commit b381e1785d
Signed by: sckova
GPG key ID: 00F325187C68651A
7 changed files with 144 additions and 72 deletions

View file

@ -3,56 +3,7 @@
pkgs,
...
}: let
catppuccin-discord-src = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "discord";
rev = "1b2dffbabf75a294a0fb9245f9f7244a853e7ada";
hash = "sha256-LdUPnnbbSwgaw37FJD2s1vPiTaISaYbtOWRxQIekQkQ=";
};
yarnOfflineCache = pkgs.fetchYarnDeps {
yarnLock = "${catppuccin-discord-src}/yarn.lock";
hash = "sha256-BhE3aKyA/LBErjWx+lbEVb/CIXhqHkXbV+9U2djIBhs=";
};
catppuccin-discord-pkg = pkgs.stdenv.mkDerivation {
pname = "catppuccin-discord";
version = "unstable";
src = catppuccin-discord-src;
nativeBuildInputs = with pkgs; [
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 build
yarn --offline release
'';
installPhase = ''
mkdir -p $out
find .
cp -r dist/* $out
'';
};
catppuccin-discord = "${catppuccin-discord-pkg}/dist/catppuccin-${config.catppuccin.flavor}-${config.catppuccin.accent}.theme.css";
catppuccin-discord = "${pkgs.catppuccin-discord}/share/catppuccin-discord/catppuccin-${config.catppuccin.flavor}-${config.catppuccin.accent}.theme.css";
mergedThemes = pkgs.runCommand "mergedConfig" {} ''
mkdir -p $out

View file

@ -3,17 +3,10 @@
pkgs,
...
}: let
catppuccin-mpv = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "mpv";
rev = "08e90daf511eee2c10c98f0031b51bb9de240d60";
sha256 = "sha256-oUheJNWk2R6gNEmkK8H6PWX0iofx2KMGDoFWtnr420A=";
};
mergedConfig = pkgs.runCommand "mergedConfig" {} ''
mkdir -p $out
${pkgs.gnused}/bin/sed 's/#1e1e2e/#000000/g' \
${catppuccin-mpv}/themes/${config.catppuccin.flavor}/${config.catppuccin.accent}.conf \
${pkgs.catppuccin-mpv-git.src}/themes/${config.catppuccin.flavor}/${config.catppuccin.accent}.conf \
> $out/mpv.conf
'';
in {

View file

@ -3,19 +3,12 @@
pkgs,
...
}: let
catppuccin-btop = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "btop";
rev = "f437574b600f1c6d932627050b15ff5153b58fa3";
sha256 = "sha256-mEGZwScVPWGu+Vbtddc/sJ+mNdD2kKienGZVUcTSl+c=";
};
mergedConfig = pkgs.runCommand "mergedConfig" {} ''
mkdir -p $out/themes
${pkgs.gnused}/bin/sed 's/blankFlavor/${config.catppuccin.flavor}/g' \
${./btop.conf} > $out/btop.conf
cp ${catppuccin-btop}/themes/catppuccin_latte.theme $out/themes/
cp ${catppuccin-btop}/themes/catppuccin_${config.catppuccin.flavor}.theme $out/themes/nixos.theme
cp ${pkgs.catppuccin-btop-git.src}/themes/catppuccin_latte.theme $out/themes/
cp ${pkgs.catppuccin-btop-git.src}/themes/catppuccin_${config.catppuccin.flavor}.theme $out/themes/nixos.theme
'';
in {
home.file.".config/btop" = {