2021-11-17 16:32:18 +01:00
|
|
|
{ pkgs, config, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.eboskma.programs.firefox;
|
|
|
|
|
|
|
|
profileSettings = {
|
|
|
|
"devtools.theme" = "dark";
|
|
|
|
"widget.content.allow-gtk-dark-theme" = true;
|
|
|
|
"ui.key.menuAccessKeyFocuses" = false;
|
|
|
|
"image.avif.enable" = true;
|
|
|
|
"privacy.webrtc.allowSilencingNotifications" = true;
|
|
|
|
"privacy.webrtc.legacyGlobalIndicator" = false;
|
2021-11-21 19:07:12 +01:00
|
|
|
"browser.shell.checkDefaultBrowser" = false;
|
2021-11-17 16:32:18 +01:00
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.eboskma.programs.firefox = {
|
|
|
|
enable = mkEnableOption "enable firefox";
|
|
|
|
work = mkOption {
|
|
|
|
description = "whether this is a work config";
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf (cfg.enable) {
|
|
|
|
programs.firefox = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
profiles = {
|
|
|
|
private = {
|
|
|
|
id = 0;
|
|
|
|
isDefault = !cfg.work;
|
|
|
|
settings = profileSettings;
|
|
|
|
};
|
|
|
|
|
|
|
|
horus = {
|
|
|
|
id = 1;
|
|
|
|
isDefault = cfg.work;
|
|
|
|
settings = profileSettings;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|