Merge pull request #200856 from aacebedo/aacebedo/streamdeck-ui_package_option

This commit is contained in:
Sandro 2022-12-17 00:46:28 +01:00 committed by GitHub
commit d154d50e2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,8 @@ with lib;
let let
cfg = config.programs.streamdeck-ui; cfg = config.programs.streamdeck-ui;
in { in
{
options.programs.streamdeck-ui = { options.programs.streamdeck-ui = {
enable = mkEnableOption (lib.mdDoc "streamdeck-ui"); enable = mkEnableOption (lib.mdDoc "streamdeck-ui");
@ -13,15 +14,20 @@ in {
type = types.bool; type = types.bool;
description = lib.mdDoc "Whether streamdeck-ui should be started automatically."; description = lib.mdDoc "Whether streamdeck-ui should be started automatically.";
}; };
package = mkPackageOption pkgs "streamdeck-ui" {
default = [ "streamdeck-ui" ];
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
streamdeck-ui cfg.package
(mkIf cfg.autoStart (makeAutostartItem { name = "streamdeck-ui"; package = streamdeck-ui; })) (mkIf cfg.autoStart (makeAutostartItem { name = "streamdeck-ui"; package = cfg.package; }))
]; ];
services.udev.packages = with pkgs; [ streamdeck-ui ]; services.udev.packages = [ cfg.package ];
}; };
meta.maintainers = with maintainers; [ majiir ]; meta.maintainers = with maintainers; [ majiir ];