helm/lib/generators.nix
Henrik Lissner 299257cfd4 Upgrade to qutebrowser 2.0.1
+ Refactor config (again).
+ Accommodate new Brave adblocker.
+ Polish UI settings (overlay scrollbar)
+ Remove outdated userstyles (some of these sites offer dark modes now)
2021-02-02 04:08:01 -05:00

31 lines
900 B
Nix

{ lib, pkgs, ... }:
with builtins;
with lib;
{
toCSSFile = file:
let fileName = removeSuffix ".scss" (baseNameOf file);
compiledStyles =
pkgs.runCommand "compileScssFile"
{ buildInputs = [ pkgs.sass ]; } ''
mkdir "$out"
scss --sourcemap=none \
--no-cache \
--style compressed \
--default-encoding utf-8 \
"${file}" \
>>"$out/${fileName}.css"
'';
in "${compiledStyles}/${fileName}.css";
toFilteredImage = imageFile: options:
let result = "result.png";
filteredImage =
pkgs.runCommand "filterWallpaper"
{ buildInputs = [ pkgs.imagemagick ]; } ''
mkdir "$out"
convert ${options} ${imageFile} $out/${result}
'';
in "${filteredImage}/${result}";
}