dotfiles/home/apps/music.nix

107 lines
2.2 KiB
Nix
Raw Normal View History

2023-02-10 07:46:37 +01:00
{
config,
lib,
pkgs,
...
}: let
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
2023-02-10 07:46:37 +01:00
in {
programs.ncmpcpp = {
enable = isLinux;
bindings = [
2023-02-10 07:46:37 +01:00
{
key = "j";
command = "scroll_down";
}
{
key = "k";
command = "scroll_up";
}
{
key = "J";
command = ["select_item" "scroll_down"];
}
{
key = "K";
command = ["select_item" "scroll_up"];
}
{
key = "h";
command = "previous_column";
}
{
key = "l";
command = "next_column";
}
{
key = "ctrl-b";
command = "page_up";
}
{
key = "ctrl-u";
command = "page_up";
}
{
key = "ctrl-f";
command = "page_down";
}
{
key = "ctrl-d";
command = "page_down";
}
{
key = "g";
command = "move_home";
}
{
key = "G";
command = "move_end";
}
{
key = "n";
command = "next_found_item";
}
{
key = "N";
command = "previous_found_item";
}
];
};
services = {
mpd.enable = isLinux;
mpd-discord-rpc = {
enable = isLinux;
settings = {
format = {
state = "$artist";
large_image = "https://cdn.discordapp.com/emojis/743725086262951957.gif";
large_text = "$album";
small_image = "https://cdn.discordapp.com/emojis/743723149455261717.png";
small_text = "pretty fucking based";
};
};
};
};
2023-02-14 19:17:18 +01:00
home.packages =
[]
++ lib.optionals isLinux [
pkgs.unstable.cider
]
++ lib.optionals isDarwin [
pkgs.nur.repos.nekowinston.discord-applemusic-rich-presence
];
launchd.agents.discord-applemusic-rich-presence = {
enable = true;
config = {
ProgramArguments = ["${lib.getExe pkgs.nur.repos.nekowinston.discord-applemusic-rich-presence}"];
KeepAlive = true;
RunAtLoad = true;
2023-02-24 22:01:32 +01:00
StandardErrorPath = "${config.xdg.cacheHome}/discord-applemusic-rich-presence.log";
StandardOutPath = "${config.xdg.cacheHome}/discord-applemusic-rich-presence.log";
};
};
}