fix(music): use getExe for discord presence

This commit is contained in:
winston 2023-02-09 17:33:44 +01:00
parent 89813f9e81
commit c6278d9864
Signed by: winston
GPG key ID: 3786770EDBC2B481

View file

@ -1,8 +1,9 @@
{ config, pkgs, ... }: { config, lib, pkgs, ... }:
let let
inherit (pkgs.stdenv.hostPlatform) isDarwin; inherit (pkgs.stdenv.hostPlatform) isDarwin;
inherit (pkgs.stdenv.hostPlatform) isLinux; inherit (pkgs.stdenv.hostPlatform) isLinux;
darp = pkgs.callPackage ../packages/discord-applemusic-rich-presence {};
in in
{ {
@ -42,14 +43,14 @@ in
}; };
}; };
home.packages = with pkgs; lib.optionals isDarwin [ home.packages = lib.mkIf isDarwin [
(callPackage ../packages/discord-applemusic-rich-presence {}) darp
]; ];
launchd.agents.discord-applemusic-rich-presence = { launchd.agents.discord-applemusic-rich-presence = {
enable = true; enable = true;
config = { config = {
ProgramArguments = [ "${config.home.homeDirectory}/.nix-profile/bin/discord-applemusic-rich-presence" ]; ProgramArguments = [ "${lib.getExe darp}" ];
KeepAlive = true; KeepAlive = true;
RunAtLoad = true; RunAtLoad = true;
StandardErrorPath = "${config.home.homeDirectory}/.cache/discord-applemusic-rich-presence.log"; StandardErrorPath = "${config.home.homeDirectory}/.cache/discord-applemusic-rich-presence.log";