From ae8dc91c7fb6859282709857e0f1e610fadf061b Mon Sep 17 00:00:00 2001 From: Martin Larsson Date: Sun, 11 May 2025 20:39:41 +0200 Subject: [PATCH] Wrap discord and silence std output, otherwise it crashes when run outside of terminal --- nix/pkgs/linux.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nix/pkgs/linux.nix b/nix/pkgs/linux.nix index 1f45d4d..91a2910 100644 --- a/nix/pkgs/linux.nix +++ b/nix/pkgs/linux.nix @@ -20,6 +20,13 @@ let sha256 = "sha256-mpTrvgYiMfamMebtytY0bLouSbaP3qEqP8pgCFl+xPQ="; }; + discord_wrapped = pkgs.writeShellScriptBin "discord" '' + #!${pkgs.runtimeShell} + # Execute the original Discord binary, redirecting stdout and stderr to /dev/null + # "$@" passes along any arguments (like URLs for opening links in Discord) + exec "${pkgs.discord}/bin/discord" "$@" >/dev/null 2>&1 + ''; + bananaCursorBlue = pkgs.stdenv.mkDerivation { pname = "banana-cursor-blue"; version = "2.0.0"; @@ -142,6 +149,9 @@ in slurp pavucontrol playerctl + discord_wrapped + spotify + mako ]; file = { @@ -154,6 +164,10 @@ in }; }; + services = { + mako.enable = true; + }; + programs = { firefox = { enable = true;