diff options
author | Alexandre Acebedo <alexandre.acebedo@qorvo.com> | 2022-11-12 14:14:21 +0100 |
---|---|---|
committer | Alexandre Acebedo <alexandre.acebedo@qorvo.com> | 2022-11-12 14:14:21 +0100 |
commit | 19f7b566a1e94513a44f009e4d16cfcb76002d86 (patch) | |
tree | 93dae5e899a220965e37911b545119267c07b2bc /nixos/modules/programs | |
parent | 952871ce36cdbf254ba7ef6251a3fa40c4ae5823 (diff) |
streamdeck-ui: add option to select the package
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r-- | nixos/modules/programs/streamdeck-ui.nix | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/nixos/modules/programs/streamdeck-ui.nix b/nixos/modules/programs/streamdeck-ui.nix index e933b899c55ec..113d1d49e151a 100644 --- a/nixos/modules/programs/streamdeck-ui.nix +++ b/nixos/modules/programs/streamdeck-ui.nix @@ -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 ]; |