[Nix-dev] Permission error when installing mpd

James Cook james.cook at utoronto.ca
Thu Feb 19 21:28:34 CET 2015


Hm, this sounds like a bug actually. Maybe the mkdir is running as mpd
but the author of that .nix file expected it to run as root? (Can
anyone contradict this?)

If you have a moment, please record the error you're seeing when you
just use mpd.enable = true, and then file a bug on github.

As a workaround, as root try creating the directory it's trying to
create and chown to mpd:mpd. Hopefully that should let mpd start.

On 19 February 2015 at 01:40, Nikita Karetnikov <nikita at karetnikov.org> wrote:
>> Looking at the source (nixos/modules/services/audio/mpd.nix), it looks
>> like the mpd service is designed to run as the mpd user. If you are
>> willing to go with that design, I guess you should not set
>> services.mpd.dataDir, and make sure the mpd user has read access to
>> your music directory. (It tries to create /home/nikita because that's
>> where its dataDir is supposed to go.)
>
> I'm willing to go with anything.  I've tried setting just
>
>   mpd.enable = true;
>
> but it has a similar permission-related problem.
>
> Could anyone share the configuration that's known to work, so I could
> forget about it?


More information about the nix-dev mailing list