3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/modules/programs/streamdeck-ui.nix
pennae 9da5f12ecf modules: add mkPackageOptionMD
another transitional option factory, like mkAliasOptionModuleMD.
2023-01-05 02:33:13 +01:00

35 lines
763 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.streamdeck-ui;
in
{
options.programs.streamdeck-ui = {
enable = mkEnableOption (lib.mdDoc "streamdeck-ui");
autoStart = mkOption {
default = true;
type = types.bool;
description = lib.mdDoc "Whether streamdeck-ui should be started automatically.";
};
package = mkPackageOptionMD pkgs "streamdeck-ui" {
default = [ "streamdeck-ui" ];
};
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
cfg.package
(mkIf cfg.autoStart (makeAutostartItem { name = "streamdeck-ui"; package = cfg.package; }))
];
services.udev.packages = [ cfg.package ];
};
meta.maintainers = with maintainers; [ majiir ];
}