From 44813a8a613c8e56db614b2ea450f8ed0d06cbad Mon Sep 17 00:00:00 2001 From: Majiir Paktu Date: Fri, 11 Aug 2023 23:17:37 -0400 Subject: [PATCH] streamdeck-ui: split desktop items --- nixos/modules/programs/streamdeck-ui.nix | 2 +- .../misc/streamdeck-ui/default.nix | 26 ++++++++++++------- 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