mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 05:05:29 +03:00
nixos/programs: add zoom-us module
The zoom-us package can be build with pulseaudio and with support for one or more xdg-desktop-portal implementations. This new module sets the proper build options from the system configuration, and adds the resulting package to `systemPackages`. If an individual `zoom-us` package is assigned to the `package` option with `package = zoom-us.override { ... };`, arguments given to `.override` will take precedence over the options determined by the module. This permits to explicitly enable or disable some zoom-us features while keeping the module's choices for other features. Co-authored-by: Philip Taron <philip.taron@gmail.com>
This commit is contained in:
parent
b215903865
commit
1a5059ded6
2 changed files with 64 additions and 0 deletions
|
@ -357,6 +357,7 @@
|
|||
./programs/ydotool.nix
|
||||
./programs/yubikey-touch-detector.nix
|
||||
./programs/zmap.nix
|
||||
./programs/zoom-us.nix
|
||||
./programs/zoxide.nix
|
||||
./programs/zsh/oh-my-zsh.nix
|
||||
./programs/zsh/zsh-autoenv.nix
|
||||
|
|
63
nixos/modules/programs/zoom-us.nix
Normal file
63
nixos/modules/programs/zoom-us.nix
Normal file
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.programs.zoom-us = {
|
||||
enable = lib.mkEnableOption "zoom.us video conferencing application";
|
||||
package = lib.mkPackageOption pkgs "zoom-us" { };
|
||||
};
|
||||
|
||||
config.environment.systemPackages = lib.mkIf config.programs.zoom-us.enable (
|
||||
lib.singleton (
|
||||
# The pattern here is to use the already-overridden value, or provide a default based on the
|
||||
# configuration elsewhere.
|
||||
config.programs.zoom-us.package.override (prev: {
|
||||
# Support pulseaudio if it's enabled on the system.
|
||||
pulseaudioSupport = prev.pulseaudioSupport or config.services.pulseaudio.enable;
|
||||
|
||||
# Support Plasma 6 desktop environment if it's enabled on the system.
|
||||
plasma6XdgDesktopPortalSupport =
|
||||
prev.plasma6XdgDesktopPortalSupport or config.services.desktopManager.plasma6.enable;
|
||||
|
||||
# Support Plasma 5 desktop environment if it's enabled on the system.
|
||||
plasma5XdgDesktopPortalSupport =
|
||||
prev.plasma5XdgDesktopPortalSupport or config.services.xserver.desktopManager.plasma5.enable;
|
||||
|
||||
# Support LXQT desktop environment if it's enabled on the system.
|
||||
# There's also `config.services.xserver.desktopManager.lxqt.enable`
|
||||
lxqtXdgDesktopPortalSupport = prev.lxqtXdgDesktopPortalSupport or config.xdg.portal.lxqt.enable;
|
||||
|
||||
# Support GNOME desktop environment if it's enabled on the system.
|
||||
gnomeXdgDesktopPortalSupport =
|
||||
prev.gnomeXdgDesktopPortalSupport or config.services.xserver.desktopManager.gnome.enable;
|
||||
|
||||
# Support Hyprland desktop for Wayland if it's enabled on the system.
|
||||
hyprlandXdgDesktopPortalSupport =
|
||||
prev.hyprlandXdgDesktopPortalSupport or config.programs.hyprland.enable;
|
||||
|
||||
# Support `wlroots` XDG desktop portal support if it's enabled.
|
||||
wlrXdgDesktopPortalSupport = prev.wlrXdgDesktopPortalSupport or config.xdg.portal.wlr.enable;
|
||||
|
||||
# Support xapp XDG desktop portals if the Cinnamon desktop environment is enabled.
|
||||
# The site claims that it's also used for Xfce4 and MATE; consider adding those to the
|
||||
# default in the future.
|
||||
xappXdgDesktopPortalSupport =
|
||||
prev.xappXdgDesktopPortalSupport or config.services.xserver.desktopManager.cinnamon.enable;
|
||||
|
||||
# Finally, if the `xdg.portal.enable` option is set somehow, use the `targetPkgs` function
|
||||
# to add those relevant packages in.
|
||||
targetPkgs =
|
||||
prev.targetPkgs or (
|
||||
pkgs:
|
||||
lib.optionals config.xdg.portal.enable (
|
||||
[ pkgs.xdg-desktop-portal ] ++ config.xdg.portal.extraPortals
|
||||
)
|
||||
);
|
||||
})
|
||||
)
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue