dotfiles/user-modules/browser/qutebrowser/default.nix

52 lines
1.4 KiB
Nix
Raw Normal View History

2024-07-19 12:00:55 +00:00
{
config,
lib,
pkgs,
...
}:
2024-07-19 01:34:42 +00:00
with lib;
let
cfg = config.modules.qutebrowser;
theme = config.theming;
2024-07-19 12:00:55 +00:00
in
{
2024-07-20 04:10:56 +00:00
options.modules.qutebrowser = {
enable = mkEnableOption "qutebrowser";
default = mkEnableOption "default";
};
2024-07-19 01:34:42 +00:00
config = mkIf cfg.enable {
2024-07-20 04:10:56 +00:00
default.browser = mkIf cfg.default "org.qutebrowser.qutebrowser.desktop";
2024-09-02 18:03:39 +00:00
# TODO: Remove once nixpkgs updates
# nixpkgs.config.packageOverrides = pkgs: {
# python3 = pkgs.python3.override {
# packageOverrides = self: super: {
# pykeepass = super.pykeepass.overrideAttrs (attrs: {
# version = "4.1.0.post1";
# src = pkgs.fetchFromGitHub {
# owner = "libkeepass";
# repo = "pykeepass";
# rev = "refs/tags/v4.1.0.post1";
# hash = "sha256-64is/XoRF/kojqd4jQIAQi1od8TRhiv9uR+WNIGvP2A=";
# };
# });
# };
# };
# };
2024-09-02 18:03:39 +00:00
2024-07-19 01:34:42 +00:00
programs.qutebrowser = {
enable = true;
extraConfig = ''
2025-01-23 23:28:22 +00:00
# config.set("completion.web_history.max_items", 30)
2024-07-19 01:34:42 +00:00
config.set("colors.webpage.darkmode.enabled", False)
config.set("colors.webpage.preferred_color_scheme", "${if theme.darkMode then "dark" else "light"}")
2025-01-24 01:26:24 +00:00
config.set("fonts.default_family", "${theme.fonts.interface.name}")
config.set("fonts.default_size", "${toString theme.fonts.interface.recommendedSize}pt")
2024-07-19 01:34:42 +00:00
'';
};
};
2024-07-19 12:00:55 +00:00
}