forked from pub-solar/os
c2fa18a063
The current qutebrowser configuration is sufficiently complex that it benefits from being factored out into a separate subprofile. An additional benefit is that this subprofile is now exported via the `nixosModules` flake output.
38 lines
730 B
Nix
38 lines
730 B
Nix
{ pkgs, ... }:
|
|
let
|
|
inherit (builtins) readFile;
|
|
in
|
|
{
|
|
sound.enable = true;
|
|
|
|
environment = {
|
|
etc."xdg/qutebrowser/config.py".text = let
|
|
mpv = "${pkgs.mpv}/bin/mpv";
|
|
in
|
|
''
|
|
${readFile ./config.py}
|
|
|
|
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
|
|
];
|
|
};
|
|
|
|
nixpkgs.overlays = let
|
|
overlay = final: prev: {
|
|
qute = prev.writeShellScriptBin "qute" ''
|
|
exec ${prev.qutebrowser}/bin/qutebrowser -C /etc/xdg/qutebrowser/config.py "$@"
|
|
'';
|
|
};
|
|
in
|
|
[ overlay ];
|
|
}
|