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

35 lines
850 B
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-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
}