nixpkgs/nixos/modules/programs/streamdeck-ui.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
755 B
Nix
Raw Normal View History

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