about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMajiir Paktu <majiir@nabaal.net>2023-08-11 23:17:37 -0400
committerMajiir Paktu <majiir@nabaal.net>2023-09-06 21:38:23 -0400
commit44813a8a613c8e56db614b2ea450f8ed0d06cbad (patch)
treeb1334457de5055594a6d8f91230b73773fdd9401
parent0fb2fbc3934318d52d3ae3f0d49efd143eac9388 (diff)
downloadnixlib-44813a8a613c8e56db614b2ea450f8ed0d06cbad.tar
nixlib-44813a8a613c8e56db614b2ea450f8ed0d06cbad.tar.gz
nixlib-44813a8a613c8e56db614b2ea450f8ed0d06cbad.tar.bz2
nixlib-44813a8a613c8e56db614b2ea450f8ed0d06cbad.tar.lz
nixlib-44813a8a613c8e56db614b2ea450f8ed0d06cbad.tar.xz
nixlib-44813a8a613c8e56db614b2ea450f8ed0d06cbad.tar.zst
nixlib-44813a8a613c8e56db614b2ea450f8ed0d06cbad.zip
streamdeck-ui: split desktop items
-rw-r--r--nixos/modules/programs/streamdeck-ui.nix2
-rw-r--r--pkgs/applications/misc/streamdeck-ui/default.nix26
2 files changed, 18 insertions, 10 deletions
diff --git a/nixos/modules/programs/streamdeck-ui.nix b/nixos/modules/programs/streamdeck-ui.nix
index 4c055029e39b..220f0a35f162 100644
--- a/nixos/modules/programs/streamdeck-ui.nix
+++ b/nixos/modules/programs/streamdeck-ui.nix
@@ -24,7 +24,7 @@ in
   config = mkIf cfg.enable {
     environment.systemPackages = with pkgs; [
       cfg.package
-      (mkIf cfg.autoStart (makeAutostartItem { name = "streamdeck-ui"; package = cfg.package; }))
+      (mkIf cfg.autoStart (makeAutostartItem { name = "streamdeck-ui-noui"; package = cfg.package; }))
     ];
 
     services.udev.packages = [ cfg.package ];
diff --git a/pkgs/applications/misc/streamdeck-ui/default.nix b/pkgs/applications/misc/streamdeck-ui/default.nix
index e43ddf067a78..94d2791530a9 100644
--- a/pkgs/applications/misc/streamdeck-ui/default.nix
+++ b/pkgs/applications/misc/streamdeck-ui/default.nix
@@ -24,15 +24,23 @@ python3Packages.buildPythonApplication rec {
     ./update-pillow.patch
   ];
 
-  desktopItems = [ (makeDesktopItem {
-    name = "streamdeck-ui";
-    desktopName = "Stream Deck UI";
-    icon = "streamdeck-ui";
-    exec = "streamdeck --no-ui";
-    comment = "UI for the Elgato Stream Deck";
-    categories = [ "Utility" ];
-    noDisplay = true;
-  }) ];
+  desktopItems = let
+    common = {
+      name = "streamdeck-ui";
+      desktopName = "Stream Deck UI";
+      icon = "streamdeck-ui";
+      exec = "streamdeck";
+      comment = "UI for the Elgato Stream Deck";
+      categories = [ "Utility" ];
+    };
+  in builtins.map makeDesktopItem [
+    common
+    (common // {
+      name = "${common.name}-noui";
+      exec = "${common.exec} --no-ui";
+      noDisplay = true;
+    })
+  ];
 
   postInstall =
     let