about summary refs log tree commit diff
path: root/modules/qutebrowser.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/qutebrowser.nix')
-rw-r--r--modules/qutebrowser.nix31
1 files changed, 15 insertions, 16 deletions
diff --git a/modules/qutebrowser.nix b/modules/qutebrowser.nix
index 6ba7c07..7ebc006 100644
--- a/modules/qutebrowser.nix
+++ b/modules/qutebrowser.nix
@@ -4,24 +4,23 @@
   pkgs,
   ...
 }:
-with lib;
 let
   cfg = config.nixfiles.modules.qutebrowser;
 in
 {
-  options.nixfiles.modules.qutebrowser.enable = mkEnableOption "Qutebrowser";
+  options.nixfiles.modules.qutebrowser.enable = lib.mkEnableOption "Qutebrowser";
 
-  config = mkIf cfg.enable {
+  config = lib.mkIf cfg.enable {
     nixfiles.modules.mpv.enable = true;
 
     hm = {
-      programs.qutebrowser = with config.nixfiles.modules; {
+      programs.qutebrowser = {
         enable = true;
 
-        keyBindings.normal = mkIf mpv.enable {
+        keyBindings.normal = lib.mkIf config.nixfiles.modules.mpv.enable {
           "z" =
             let
-              mpv = getExe config.hm.programs.mpv.package;
+              mpv = lib.getExe config.hm.programs.mpv.package;
             in
             "hint links spawn --detach ${mpv} {hint-url}";
         };
@@ -169,9 +168,14 @@ in
           };
 
           editor.command = [
-            (if alacritty.enable then getExe pkgs.alacritty else getExe pkgs.xterm)
+            (
+              if config.nixfiles.modules.alacritty.enable then
+                lib.getExe pkgs.alacritty
+              else
+                lib.getExe pkgs.xterm
+            )
             "-e"
-            (getExe' config.programs.vim.package "vim")
+            (lib.getExe' config.programs.vim.package "vim")
             "-f"
             "{}"
           ];
@@ -245,11 +249,6 @@ in
             hide_decoration = false;
             title_format = "{perc}{current_title}{title_sep}qutebrowser";
           };
-
-          qt = mkIf kde.enable {
-            force_platform = null;
-            force_platformtheme = "KDE";
-          };
         };
 
         extraConfig =
@@ -296,7 +295,7 @@ in
                 }
               ];
             in
-            concatLines final + "\n"
+            lib.concatLines final + "\n"
           )
           + (
             let
@@ -306,7 +305,7 @@ in
                 (allowSetting "desktop_capture" url)
                 (allowSetting "media.audio_video_capture" url)
               ];
-              allowedMediaCapture = flatten (
+              allowedMediaCapture = lib.flatten (
                 map allowMediaCaptureSetting [
                   "https://discord.com"
                   "https://web.telegram.org"
@@ -321,7 +320,7 @@ in
 
               final = allowedMediaCapture ++ allowedNotifications;
             in
-            concatLines final + "\n"
+            lib.concatLines final + "\n"
           );
       };
 

Consider giving Nix/NixOS a try! <3