2022-01-11 18:44:40 +01:00
|
|
|
{ config, lib, pkgs, options, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.modules.desktop.apps.firefox;
|
|
|
|
wayland = config.modules.desktop.sway.enable;
|
|
|
|
in {
|
|
|
|
options.modules.desktop.apps.firefox = {
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
2022-01-14 14:48:03 +01:00
|
|
|
default = false;
|
2022-01-11 18:44:40 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-01-29 12:47:38 +01:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
user.packages = if wayland then (with pkgs; [
|
2022-01-11 18:44:40 +01:00
|
|
|
firefox-wayland
|
2022-01-29 12:47:38 +01:00
|
|
|
]) else (with pkgs; [
|
2022-01-14 14:48:03 +01:00
|
|
|
firefox
|
|
|
|
]);
|
2022-01-29 12:47:38 +01:00
|
|
|
};
|
2022-01-11 18:44:40 +01:00
|
|
|
}
|