about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorMajiir Paktu <majiir@nabaal.net>2022-07-08 12:49:09 -0400
committerMajiir Paktu <majiir@nabaal.net>2022-07-16 22:10:33 -0400
commit3ba735cce2cbb0d8b32a3888d71c9ecdf14ff77c (patch)
tree8a40965aef397ac9b5ea67f738f42d81da5a47bf /nixos/modules
parent68f01e2424fa65307943f47468d95d4c3062d44d (diff)
downloadnixlib-3ba735cce2cbb0d8b32a3888d71c9ecdf14ff77c.tar
nixlib-3ba735cce2cbb0d8b32a3888d71c9ecdf14ff77c.tar.gz
nixlib-3ba735cce2cbb0d8b32a3888d71c9ecdf14ff77c.tar.bz2
nixlib-3ba735cce2cbb0d8b32a3888d71c9ecdf14ff77c.tar.lz
nixlib-3ba735cce2cbb0d8b32a3888d71c9ecdf14ff77c.tar.xz
nixlib-3ba735cce2cbb0d8b32a3888d71c9ecdf14ff77c.tar.zst
nixlib-3ba735cce2cbb0d8b32a3888d71c9ecdf14ff77c.zip
nixos/streamdeck-ui: init
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/module-list.nix1
-rw-r--r--nixos/modules/programs/streamdeck-ui.nix28
2 files changed, 29 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 268ebbf18dd7..4faa782586da 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -215,6 +215,7 @@
   ./programs/systemtap.nix
   ./programs/starship.nix
   ./programs/steam.nix
+  ./programs/streamdeck-ui.nix
   ./programs/sway.nix
   ./programs/system-config-printer.nix
   ./programs/thefuck.nix
diff --git a/nixos/modules/programs/streamdeck-ui.nix b/nixos/modules/programs/streamdeck-ui.nix
new file mode 100644
index 000000000000..1434f82660de
--- /dev/null
+++ b/nixos/modules/programs/streamdeck-ui.nix
@@ -0,0 +1,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 = "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 ];
+}