Files
dotfiles/home/natto/mpd.nix
Amneesh Singh 5fef417fb0 home/natto: move around stuff
move git and zsh from hosts/satori and split services.nix

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-01-24 11:36:04 +05:30

80 lines
1.6 KiB
Nix

{ config, pkgs, ... }:
let
home = config.home.homeDirectory;
in
{
services = {
mpd = {
enable = true;
musicDirectory = "${home}/Music";
dbFile = "${home}/.config/mpd/database";
dataDir = "${home}/.config/mpd";
network = {
startWhenNeeded = true;
listenAddress = "any";
port = 6600;
};
extraConfig = builtins.readFile ./config/mpd/mpd.conf;
};
mpd-discord-rpc = {
enable = true;
settings = {
id = 1039532008424099850; # dont really care
format = {
large_image = "koishi";
small_image = "";
large_text = "real";
small_text = "the";
};
};
};
};
systemd.user.services = {
mpd-discord-rpc = {
Service = {
Restart = "on-failure";
RestartSec = "15s";
};
};
mpdas = {
Unit = {
After = [ "mpd.service" ];
Description = "Music Player Daemon AutoScrobbler";
};
Install.WantedBy = [ "default.target" ];
Service = {
Type = "simple";
Restart = "on-failure";
RestartSec = "15s";
ExecStart = "${pkgs.mpdas}/bin/mpdas -c ${config.age.secrets.mpdasrc.path}";
};
};
};
home = {
packages = with pkgs; [
(ncmpcpp.override {
visualizerSupport = true;
clockSupport = true;
})
mpdas
mpc_cli
];
file.ncmpcpp = {
source = ./config/ncmpcpp/config;
target = "${config.xdg.configHome}/ncmpcpp/config";
};
};
age.secrets.mpdasrc = {
file = ./secrets/mpdasrc.age;
path = "${home}/.config/mpdasrc";
};
}