mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
Merge pull request #200856 from aacebedo/aacebedo/streamdeck-ui_package_option
This commit is contained in:
commit
d154d50e2c
@ -4,7 +4,8 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.programs.streamdeck-ui;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.programs.streamdeck-ui = {
|
||||
enable = mkEnableOption (lib.mdDoc "streamdeck-ui");
|
||||
|
||||
@ -13,15 +14,20 @@ in {
|
||||
type = types.bool;
|
||||
description = lib.mdDoc "Whether streamdeck-ui should be started automatically.";
|
||||
};
|
||||
|
||||
package = mkPackageOption pkgs "streamdeck-ui" {
|
||||
default = [ "streamdeck-ui" ];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
streamdeck-ui
|
||||
(mkIf cfg.autoStart (makeAutostartItem { name = "streamdeck-ui"; package = streamdeck-ui; }))
|
||||
cfg.package
|
||||
(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 ];
|
||||
|
Loading…
Reference in New Issue
Block a user