2020-01-12 23:11:02 -08:00
|
|
|
# modules/browser/qutebrowser.nix --- https://github.com/qutebrowser/qutebrowser
|
|
|
|
#
|
|
|
|
# Qutebrowser is cute because it's not enough of a browser to be handsome.
|
|
|
|
# Still, we can all tell he'll grow up to be one hell of a lady-killer.
|
|
|
|
|
2020-01-03 21:13:46 -08:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
2020-01-12 15:17:17 -08:00
|
|
|
my.packages = [ pkgs.qutebrowser ];
|
|
|
|
my.env.BROWSER = "qutebrowser";
|
|
|
|
my.home.xdg = {
|
2020-01-03 21:13:46 -08:00
|
|
|
configFile."qutebrowser" = {
|
2020-01-17 01:22:50 -08:00
|
|
|
source = <config/qutebrowser>;
|
2020-01-03 21:13:46 -08:00
|
|
|
recursive = true;
|
|
|
|
};
|
2020-01-19 20:56:40 -08:00
|
|
|
dataFile = {
|
|
|
|
"qutebrowser/greasemonkey" = {
|
|
|
|
source = <config/qutebrowser/greasemonkey>;
|
|
|
|
recursive = true;
|
|
|
|
};
|
|
|
|
"qutebrowser/userstyles.css".source =
|
|
|
|
let compiledStyles =
|
|
|
|
with pkgs; runCommand "compileUserStyles"
|
|
|
|
{ buildInputs = [ sass ]; } ''
|
|
|
|
mkdir "$out"
|
|
|
|
for file in ${<config/qutebrowser/styles>}/*.scss; do
|
|
|
|
scss --sourcemap=none \
|
|
|
|
--no-cache \
|
|
|
|
--style compressed \
|
|
|
|
--default-encoding utf-8 \
|
|
|
|
"$file" \
|
|
|
|
>>"$out/userstyles.css"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
in "${compiledStyles}/userstyles.css";
|
2020-01-03 21:13:46 -08:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|