Files
dotfiles/home/natto/services.nix
2023-01-07 05:11:25 +05:30

88 lines
1.9 KiB
Nix

{ config, pkgs, inputs, ... }:
{
services = {
mpd = {
enable = true;
musicDirectory = "${config.home.homeDirectory}/Music";
dbFile = "${config.home.homeDirectory}/.config/mpd/database";
dataDir = "${config.home.homeDirectory}/.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";
};
};
};
dunst = {
enable = true;
settings = {
global = {
font = "Monospace 10";
frame_color = "#93a1a1";
separator_color = "#93a1a1";
shrink = true;
icon_theme = config.gtk.iconTheme.name;
};
urgency_low = {
background = "#586e75";
foreground = "#eee8d5";
timeout = 5;
};
urgency_normal = {
background = "#073642";
foreground = "#eee8d5";
timeout = 5;
};
urgency_critical = {
background = "#dc322f";
foreground = "#eee8d5";
timeout = 0;
};
};
};
};
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}";
};
};
};
}