fix: do not install Firefox package on none NisOS

This commit is contained in:
Yorick Barbanneau 2024-06-19 20:29:11 +02:00
parent 92775021d6
commit c5e303db74
2 changed files with 20 additions and 8 deletions

View file

@ -7,6 +7,12 @@ in
{
options.modules.web.firefox = {
enable = mkEnableOption "enable Firefox web browser";
installPackage = mkOption {
type = types.bool;
default = true;
description = "install Package, if false relies on distribution packages";
};
};
config = mkIf cfg.enable {
programs.browserpass = {
@ -21,14 +27,17 @@ in
"x-scheme-handler/unknown" = "firefox.desktop";
};
programs.firefox = {
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
nativeMessagingHosts = [
# Tridactyl native connector
pkgs.tridactyl-native
pkgs.browserpass
];
};
enable = true;
package =
if cfg.installPackage
then pkgs.wrapFirefox pkgs.firefox-unwrapped {
nativeMessagingHosts = [
# Tridactyl native connector
pkgs.tridactyl-native
pkgs.browserpass
];
}
else null;
profiles.ephase = {
id = 0;
name = "ephase";