Re: [Nix-dev] Permission error when installing mpd

2015-02-24 Thread Pascal Wittmann
On 02/19/2015 11:00 PM, joach...@fastmail.fm wrote: systemd.services.mpd.serviceConfig = { PermissionsStartOnly = true; }; That is neat! Thank your for it :-) signature.asc Description: OpenPGP digital signature ___ nix-dev mailing list

Re: [Nix-dev] Permission error when installing mpd

2015-02-23 Thread joachifm
On Thu, Feb 19, 2015, at 09:28 PM, James Cook wrote: 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?) This is correct [1]. Until the fix hits unstable, you can set

Re: [Nix-dev] Permission error when installing mpd

2015-02-20 Thread Nikita Karetnikov
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. https://github.com/NixOS/nixpkgs/issues/6470 signature.asc Description: PGP signature ___ nix-dev mailing list

Re: [Nix-dev] Permission error when installing mpd

2015-02-19 Thread James Cook
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

Re: [Nix-dev] Permission error when installing mpd

2015-02-19 Thread Nikita Karetnikov
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

Re: [Nix-dev] Permission error when installing mpd

2015-02-18 Thread James Cook
On 18 February 2015 at 22:22, Nikita Karetnikov nik...@karetnikov.org wrote: I've tried various options, but mpd always fails with a permission error. Here's one example: services.mpd.enable = true; services.mpd.dataDir = /home/nikita/dotfiles/mpd/.mpd; services.mpd.musicDirectory =

Re: [Nix-dev] Permission error when installing mpd

2015-02-18 Thread Kirill Elagin
As is clear from the log, it is not mpd who creates the directory, it’s the preStart = mkdir -p ${cfg.dataDir} chown -R mpd:mpd ${cfg.dataDir}; line it its unit file. The permission error likely happens because it doesn’t have the search (x) permission. Remember that it is running as

[Nix-dev] Permission error when installing mpd

2015-02-18 Thread Nikita Karetnikov
I've tried various options, but mpd always fails with a permission error. Here's one example: services.mpd.enable = true; services.mpd.dataDir = /home/nikita/dotfiles/mpd/.mpd; services.mpd.musicDirectory = /home/nikita/music; Both directories exist. $ journalctl -u mpd.service Feb 19