pub-solar-os/profiles/graphical/qutebrowser/default.nix

32 lines
741 B
Nix
Raw Normal View History

{ pkgs, ... }:
2020-01-04 05:06:31 +00:00
let inherit (builtins) readFile;
2020-07-31 04:17:28 +00:00
in
{
sound.enable = true;
environment = {
2020-07-31 04:17:28 +00:00
etc."xdg/qutebrowser/config.py".text =
let mpv = "${pkgs.mpv}/bin/mpv";
in
''
${readFile ./config.py}
2020-07-31 04:17:28 +00:00
config.bind(',m', 'hint links spawn -d ${mpv} {hint-url}')
config.bind(',v', 'spawn -d ${mpv} {url}')
'';
sessionVariables.BROWSER = "qute";
systemPackages = with pkgs; [ qute qutebrowser mpv youtubeDL rofi ];
};
2020-08-03 03:26:00 +00:00
nixpkgs.overlays = [
(final: prev: {
# wrapper to specify config file
qute = prev.writeShellScriptBin "qute" ''
2020-12-21 10:10:38 +00:00
QT_QPA_PLATFORMTHEME= exec ${final.qutebrowser}/bin/qutebrowser -C /etc/xdg/qutebrowser/config.py "$@"
2020-08-03 03:26:00 +00:00
'';
})
];
}