2020-03-28 22:48:43 -07: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-10-01 15:46:04 -07:00
|
|
|
{ options, config, lib, pkgs, ... }:
|
|
|
|
|
2020-03-28 22:48:43 -07:00
|
|
|
with lib;
|
2020-10-01 15:46:04 -07:00
|
|
|
with lib.my;
|
|
|
|
let cfg = config.modules.desktop.browsers.qutebrowser;
|
|
|
|
in {
|
2020-03-28 22:48:43 -07:00
|
|
|
options.modules.desktop.browsers.qutebrowser = {
|
2020-10-01 15:46:04 -07:00
|
|
|
enable = mkBoolOpt false;
|
|
|
|
userStyles = mkOpt types.lines "";
|
2020-03-28 22:48:43 -07:00
|
|
|
};
|
|
|
|
|
2020-10-01 15:46:04 -07:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
user.packages = with pkgs; [
|
2020-03-28 22:48:43 -07:00
|
|
|
qutebrowser
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "qutebrowser-private";
|
|
|
|
desktopName = "Qutebrowser (Private)";
|
|
|
|
genericName = "Open a private Qutebrowser window";
|
|
|
|
icon = "qutebrowser";
|
|
|
|
exec = "${qutebrowser}/bin/qutebrowser ':open -p'";
|
|
|
|
categories = "Network";
|
|
|
|
})
|
|
|
|
];
|
2020-10-01 15:46:04 -07:00
|
|
|
|
|
|
|
home = {
|
|
|
|
configFile."qutebrowser" = {
|
|
|
|
source = "${configDir}/qutebrowser";
|
|
|
|
recursive = true;
|
|
|
|
};
|
|
|
|
dataFile."qutebrowser/userstyles.css".text = userStyles;
|
2020-03-28 22:48:43 -07:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|