Files
nixos/legacy/dotfiles/home-manager/util/blur.nix
primary dc481c24b0 Add 'legacy/dotfiles/' from commit 'e9a44f677d2852fd5856cecc49ecb984efeba66c'
git-subtree-dir: legacy/dotfiles
git-subtree-mainline: 382887df65
git-subtree-split: e9a44f677d
2026-04-18 00:45:25 -04:00

26 lines
512 B
Nix

{
stdenv,
imagemagick,
src,
}:
stdenv.mkDerivation {
pname = "blur-image";
version = "1.0";
inherit src;
buildInputs = [ imagemagick ];
# input is a file, not a directory, skip unpackPhase
unpackPhase = "true";
# command taken from: https://old.reddit.com/r/swaywm/comments/oz3t7v/setting_a_blurred_background_with_swaylock_and/
buildPhase = ''
magick ${src} -filter Gaussian -resize 20% -blur 0x2.5 -resize 500% output.png
'';
installPhase = ''
mv output.png $out
'';
}