graphical#qutebrowser: init
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.
This commit is contained in:
parent
3e43465bc6
commit
c2fa18a063
|
@ -1,5 +1,7 @@
|
|||
{
|
||||
graphical = import ./graphical;
|
||||
sway = import ./graphical/sway;
|
||||
qutebrowser = import ./graphical/qutebrowser;
|
||||
develop = import ./develop;
|
||||
misc = import ./misc;
|
||||
games = import ./game;
|
||||
|
|
|
@ -14,8 +14,6 @@ in
|
|||
hardware.opengl.driSupport = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
|
||||
sound.enable = true;
|
||||
|
||||
environment = {
|
||||
etc = {
|
||||
"xdg/gtk-3.0/settings.ini" = {
|
||||
|
@ -27,22 +25,9 @@ in
|
|||
'';
|
||||
mode = "444";
|
||||
};
|
||||
|
||||
"xdg/qutebrowser/config.py".text = let
|
||||
mpv = "${pkgs.mpv}/bin/mpv";
|
||||
in
|
||||
''
|
||||
${readFile ./qutebrowser/config.py}
|
||||
|
||||
config.bind(',m', 'hint links spawn -d ${mpv} {hint-url}')
|
||||
config.bind(',v', 'spawn -d ${mpv} {url}')
|
||||
'';
|
||||
};
|
||||
|
||||
sessionVariables = {
|
||||
# default browser
|
||||
BROWSER = "qute";
|
||||
|
||||
# Theme settings
|
||||
QT_QPA_PLATFORMTHEME = "gtk2";
|
||||
GTK2_RC_FILES = let
|
||||
|
@ -71,13 +56,8 @@ in
|
|||
imlib2
|
||||
librsvg
|
||||
libsForQt5.qtstyleplugins
|
||||
mpv
|
||||
networkmanager_dmenu
|
||||
papirus-icon-theme
|
||||
qute
|
||||
qutebrowser
|
||||
sddm-chili
|
||||
youtubeDL
|
||||
zathura
|
||||
];
|
||||
};
|
||||
|
@ -94,22 +74,18 @@ in
|
|||
};
|
||||
|
||||
nixpkgs.overlays = let
|
||||
overlay = self: super: {
|
||||
qute = super.writeShellScriptBin "qute" ''
|
||||
exec ${super.qutebrowser}/bin/qutebrowser -C /etc/xdg/qutebrowser/config.py "$@"
|
||||
'';
|
||||
|
||||
cursor = super.writeTextDir "share/icons/default/index.theme" ''
|
||||
overlay = final: prev: {
|
||||
cursor = prev.writeTextDir "share/icons/default/index.theme" ''
|
||||
[icon theme]
|
||||
Inherits=Adwaita
|
||||
'';
|
||||
|
||||
ffmpeg-full = super.ffmpeg-full.override {
|
||||
svt-av1 = super.svt-av1;
|
||||
dav1d = super.dav1d;
|
||||
ffmpeg-full = prev.ffmpeg-full.override {
|
||||
svt-av1 = prev.svt-av1;
|
||||
dav1d = prev.dav1d;
|
||||
libaom = null;
|
||||
opencore-amr = null;
|
||||
libopus = super.libopus;
|
||||
libopus = prev.libopus;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
37
profiles/graphical/qutebrowser/default.nix
Normal file
37
profiles/graphical/qutebrowser/default.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ 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 ];
|
||||
}
|
|
@ -11,7 +11,7 @@ set $right l
|
|||
set $term alacritty
|
||||
|
||||
# preferred browser
|
||||
set $browser qute
|
||||
set $browser $$BROWSER
|
||||
|
||||
# Your preferred application launcher
|
||||
# Note: it's recommended that you pass the final command to sway
|
||||
|
|
|
@ -9,6 +9,12 @@ let
|
|||
;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../qutebrowser
|
||||
];
|
||||
|
||||
sound.enable = true;
|
||||
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
|
||||
|
@ -24,6 +30,8 @@ in
|
|||
|
||||
extraPackages = with pkgs; options.programs.sway.extraPackages.default
|
||||
++ [
|
||||
dmenu
|
||||
networkmanager_dmenu
|
||||
qt5.qtwayland
|
||||
alacritty
|
||||
volnoti
|
||||
|
|
Loading…
Reference in a new issue