users/foo-dogsquared: refactor browser configuration

This commit is contained in:
Gabriel Arazas 2023-09-28 10:28:43 +08:00
parent bdeccc3c08
commit 4ebaca7a13
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -1,6 +1,8 @@
# WHOA! Even browsers with extensions can be declarative! # WHOA! Even browsers with extensions can be declarative!
{ config, lib, pkgs, osConfig ? { }, ... }: { config, lib, pkgs, osConfig ? { }, ... }:
{
config = lib.mkMerge [
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
google-chrome-dev google-chrome-dev
@ -31,9 +33,11 @@
{ id = "nglaklhklhcoonedhgnpgddginnjdadi"; } # ActivityWatch Web Watcher { id = "nglaklhklhcoonedhgnpgddginnjdadi"; } # ActivityWatch Web Watcher
]; ];
}; };
}
(lib.mkIf (osConfig ? programs.firefox.enable -> !osConfig.programs.firefox.enable) {
# Despite the name, it isn't a browser for furries. # Despite the name, it isn't a browser for furries.
programs.firefox = lib.mkIf (osConfig ? programs.firefox.enable -> !osConfig.programs.firefox.enable) { programs.firefox = {
enable = true; enable = true;
package = with pkgs; wrapFirefox firefox-unwrapped { package = with pkgs; wrapFirefox firefox-unwrapped {
@ -176,4 +180,6 @@
# Configuring Tridactyl. # Configuring Tridactyl.
xdg.configFile.tridactyl.source = ../config/tridactyl; xdg.configFile.tridactyl.source = ../config/tridactyl;
})
];
} }