about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/programs/streamdeck-ui.nix
blob: 04aa0a80e88976ac29c4936312ef3d11a758a20b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ config, lib, pkgs, ... }:

with lib;

let
  cfg = config.programs.streamdeck-ui;
in {
  options.programs.streamdeck-ui = {
    enable = mkEnableOption "streamdeck-ui";

    autoStart = mkOption {
      default = true;
      type = types.bool;
      description = lib.mdDoc "Whether streamdeck-ui should be started automatically.";
    };
  };

  config = mkIf cfg.enable {
    environment.systemPackages = with pkgs; [
      streamdeck-ui
      (mkIf cfg.autoStart (makeAutostartItem { name = "streamdeck-ui"; package = streamdeck-ui; }))
    ];

    services.udev.packages = with pkgs; [ streamdeck-ui ];
  };

  meta.maintainers = with maintainers; [ majiir ];
}