From ddbb19952dff0933f3a768ac15a9617d45732316 Mon Sep 17 00:00:00 2001 From: Amneesh Singh Date: Thu, 10 Nov 2022 20:03:28 +0530 Subject: [PATCH] home/natto: add mpdas Signed-off-by: Amneesh Singh --- home/natto/email.nix | 3 +++ home/natto/services.nix | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/home/natto/email.nix b/home/natto/email.nix index fd97773..5fa8bda 100644 --- a/home/natto/email.nix +++ b/home/natto/email.nix @@ -41,6 +41,9 @@ in }; }; }; + services = { + imapnotify.enable = true; + }; programs = { mbsync.enable = true; neomutt = rec { diff --git a/home/natto/services.nix b/home/natto/services.nix index 44d6be0..f7ac2f3 100644 --- a/home/natto/services.nix +++ b/home/natto/services.nix @@ -50,4 +50,20 @@ in }; }; }; + + systemd.user.services.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}"; + }; + }; }