X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fmpd.nix;h=640b0015f6078fc47fbf152abf005358c73f59f2;hb=f69e0c01557a7cd2c6f353f71126c4cd47ae344c;hp=f2e87bb8006c1152fec3f6f6583fba251e7e69ed;hpb=da30ae4ffdd153a1eb32fb86f9ca9a65aa19e4e2;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/mpd.nix b/modules/private/mpd.nix index f2e87bb..640b001 100644 --- a/modules/private/mpd.nix +++ b/modules/private/mpd.nix @@ -2,25 +2,20 @@ { options.myServices.mpd.enable = lib.mkEnableOption "enable MPD"; config = lib.mkIf config.myServices.mpd.enable { - services.duplyBackup.profiles.mpd = { - rootDir = "/var/lib/mpd"; - }; - secrets.keys = [ - { - dest = "mpd"; + secrets.keys = { + "mpd" = { permissions = "0400"; text = config.myEnv.mpd.password; - } - { - dest = "mpd-config"; + }; + "mpd-config" = { permissions = "0400"; user = "mpd"; group = "mpd"; text = '' password "${config.myEnv.mpd.password}@read,add,control,admin" ''; - } - ]; + }; + }; networking.firewall.allowedTCPPorts = [ 6600 ]; users.users.mpd.extraGroups = [ "wwwrun" "keys" ]; systemd.services.mpd.serviceConfig.RuntimeDirectory = "mpd";