feat(home-manager): install qutebrowser with NixGL
Work on non NixOS system
This commit is contained in:
parent
db6386ebc0
commit
6f3a124bc5
3 changed files with 30 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
{ lib, config, ... }:
|
||||
{ lib, config, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.web.qutebrowser;
|
||||
|
@ -6,8 +6,31 @@ in
|
|||
{
|
||||
options.modules.web.qutebrowser = {
|
||||
enable = mkEnableOption "enable Qutebrowser web browser";
|
||||
|
||||
enableNixGL = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Use NixGL to start Qutebrowser";
|
||||
};
|
||||
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
xdg.desktopEntries."org.qutebrowser.qutebrowser" = if cfg.enableNixGL then {
|
||||
name = "QuteBrowser NixGL Powered";
|
||||
|
||||
exec = "${pkgs.nixgl.nixGLMesa}/bin/nixGLMesa qutebrowser %u";
|
||||
icon = "qutebrowser";
|
||||
terminal = false;
|
||||
type = "Application";
|
||||
startupNotify = true;
|
||||
actions = {
|
||||
"preference" = {
|
||||
exec = "${pkgs.nixgl.nixGLMesa}/bin/nixGLMesa qutebrowser \"qute://settings\"";
|
||||
name = "Preferences";
|
||||
};
|
||||
};
|
||||
}
|
||||
else {};
|
||||
programs.qutebrowser = {
|
||||
enable = true;
|
||||
loadAutoconfig = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue