current state of things
This commit is contained in:
parent
63fbd6d499
commit
b8d157ab6f
85 changed files with 895 additions and 6014 deletions
34
rice/wallpaper.nix
Normal file
34
rice/wallpaper.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
stdenv,
|
||||
...
|
||||
}:
|
||||
{
|
||||
palette,
|
||||
wallpaper,
|
||||
}:
|
||||
let
|
||||
strPal =
|
||||
let
|
||||
inherit (lib) concatStringsSep;
|
||||
inherit (builtins) foldl' attrValues;
|
||||
in
|
||||
concatStringsSep " " (
|
||||
foldl' (acc: el: acc ++ (attrValues el)) [ ] [ palette.normal palette.bright palette.util ]
|
||||
);
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "generated-wallpaper.png";
|
||||
src = wallpaper;
|
||||
buildInputs = [
|
||||
pkgs.lutgen
|
||||
];
|
||||
|
||||
phases = [ "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
echo -e "Generating wallpaper from ${wallpaper} using palette:\n${strPal}.."
|
||||
${lib.getExe pkgs.lutgen} apply --lum 0.8 -l 10 -s 128 -n 8 -o $out ${wallpaper} -- ${strPal}
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue