Commit graph

40 commits

Author SHA1 Message Date
Doron Behar
9d47c33ee0
Merge pull request #82005 from esclear/mpd-socket
nixos/mpd: allow autostart when listening for unix socket
2021-03-28 20:04:31 +00:00
volth
bc0d605cf1 treewide: fix double quoted strings in meta.description
Signed-off-by: Ben Siraphob <bensiraphob@gmail.com>
2021-01-24 19:56:59 +07:00
Doron Behar
4ce7f28508 nixos/mpd: use credentials only if needed 2021-01-11 09:07:34 +02:00
sohalt
dcbfdf1a71 nixos/mpd: remove credentialsFile in favor of credentials option 2020-12-26 17:53:01 +01:00
sohalt
f7384470de nixos/mpd: support passwords in separate files
This allows to use files containing only the mpd password without the
permissions, making it easier for other programs connecting to mpd to read the
password from the same password file.
2020-12-24 01:17:52 +01:00
Aaron Andersen
77a8496907 nixos/mpd: conditionally provision required directories with StateDirectory 2020-12-11 19:35:43 -05:00
Doron Behar
b4756fe0c4 nixos/mpd: Mention in /etc/mpd.conf it was autogenerated 2020-09-10 18:00:29 +03:00
Doron Behar
ccee8dc09f nixos/mpd: Allow to configure a credentialsFile
Allow to specify a password file to be located outside the store, and be
read in `ExecStartPre`.
2020-08-16 18:03:47 +03:00
Dominique Martinet
a4763da299 nixos/mpd: add services.mpd.fluidsynth option
fluidsynth is compiled in but soundfont-fluid needs to be explicitely
pulled in and path configured, an option makes it much simpler to use
2020-05-10 23:05:19 +02:00
Dominique Martinet
d8fa2627f3 mpd: remove user/group from conf
the options should not be set as we already change user with service
file, man mpd.conf says "Do not use this option if you start MPD as an
unprivileged user"

The group option actually is not documented at all anymore and probably
no longer exists.

These options get in the way of setting up confinement for the service,
as it would otherwise be pretty straightforward to setup, but even if
mpd is not root it would check the user exists within the chroot which
is more work (need to get nss working):

  systemd.services.mpd = {
    serviceConfig.BindPaths = [
      # mpd state dir
      "/var/lib/mpd"
      # notify systemd service started up
      "/run/systemd/notify"
    ];
    serviceConfig.BindReadOnlyPaths = [
      "/path/to/music:/var/lib/mpd/music"
    ];
    # ProtectSystem is not compatible with confinement
    serviceConfig.ProtectSystem = lib.mkForce false;
    confinement = {
      enable = true;
      binSh = null;
      mode = "chroot-only";
    };
  };
2020-05-10 20:24:33 +02:00
Daniel Albert
7a2e940a3f nixos/mpd: allow autostart when listening for unix socket 2020-03-07 20:02:25 +01:00
rnhmjoj
1d61efb7f1 treewide: use attrs instead of list for types.loaOf options 2020-01-06 10:39:18 -05:00
tobim
4a9d5493b7 mpd: 0.20.13 -> 0.21.16 (#57608)
* Refactor mpd

* mpd: 0.20.13 -> 0.21.5

Switch to meson based build, following upstream.

* Fix mpd on darwin

* mpd: 0.21.5 -> 0.21.6

* mpd-small: init add 0.21.6

* Update to 0.21.8 & fix ouput path

Also use pname instead of name.

* Update to 0.21.9

* Integrate review suggestions

- Expose run function as mpdWithFeatures.
- Throw on invalid feature requests.
- Drop major/minor version variables.
- Cosmetic improvements.

* Update to 0.21.10

* mpd: 0.21.10 -> 0.21.11

* mpd: 0.21.11 -> 0.21.12

* mpd: log to journal

* mpd: 0.21.12 -> 0.21.14

* mpd: add tobim to maintainers

* mpd: reenable syslog support

* mpd: 0.21.14 -> 0.21.15

* mpd: 0.21.15 -> 0.21.16
2019-11-13 15:38:46 +00:00
Matthias Beyer
4e3aa7b7b8 mpd: restart always
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-22 16:30:14 +02:00
Aaron Andersen
919c87a106 nixos/mpd: replace deprecated usage of PermissionsStartOnly
see https://github.com/NixOS/nixpkgs/issues/53852
2019-04-13 07:00:56 -04:00
Johannes Frankenau
b9234ea49c nixos/mpd: allow storage plugins in musicDirectory 2018-08-03 21:36:38 +02:00
Florian Klink
fff5923686 nixos/modules: users.(extraUsers|extraGroup->users|group) 2018-06-30 03:02:58 +02:00
Robert Helgesson
323c2a1c6b
mpd: fix spelling in description 2018-06-03 09:55:26 +02:00
Andreas Rammhold
a0797bad2c
nixos/mpd: allow services.mpd.dbFile to be null
This change allows users to specify an alternative database method. For
example an mpd satellite setup where another mpd on the network shares
it's database with the local instance. The `dbFile` parameter must not be
configured in that case.
2018-06-01 19:17:15 +02:00
Casey Rodarmor
ae02dd2d0a nixos/mpd: allow configuring playlist directory (#28252) 2017-08-20 20:34:34 +00:00
Johannes Frankenau
c4528eb4cc mpd service: Start when needed and harden 2017-07-04 09:50:34 +02:00
Johannes Frankenau
0dd204ebfe mpd service: Create playlist directory 2017-07-01 09:13:49 +02:00
Profpatsch
2b0469c48f modules/mpd: factor out name & mention man 5 mpd.conf 2017-02-18 16:03:16 +01:00
tg(x)
002f3c8760 mpd: listen on 127.0.0.1 by default 2017-01-01 13:46:39 +01:00
Emery Hemingway
b675619391 nixos: use types.lines for extraConfig 2016-10-23 19:41:43 +02:00
Joachim Fasting
0a6221578a
mpd service: replace script with serviceConfig.ExecStart 2016-09-10 18:30:14 +02:00
Joachim Fasting
009c1848c2
mpd service: add types to all options 2016-09-10 18:30:14 +02:00
Bjørn Forsman
79367816a9 nixos/mpd: rename 'host' to 'listenAddress'
More descriptive option name.
2015-12-24 00:04:04 +01:00
Unai Zalakain
8811724ec9 The user specified in the conf should run MPD 2015-06-13 23:24:19 +02:00
Rickard Nilsson
3620b27a66 mpd: Make it possible to specify db file path 2015-04-10 23:10:14 +02:00
aszlig
ea2fd84ecd
nixos/mpd: Fix creation of "mpd" group.
The group is specified using a singleton list, so the loaOf merging is
done by iterating through the list items with imap, so it enumerates
every element and sets that as the default "name" attribute.

From lib/types:143:

name = elem.name or "unnamed-${toString defIdx}.${toString elemIdx}";

So, people get groups like "unnamed-X.Y" instead of "mpd".

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Reported-by: devhell <"^"@regexmail.net>
Tested-by: devhell <"^"@regexmail.net>
2015-03-20 20:58:13 +01:00
koral
9c4cbaa553 Fix mpd configuration (enclosing quotes needed). 2015-03-14 12:15:34 +00:00
Unai Zalakain
581a90bad8 Optional user and group to run the MPD 2015-03-08 10:18:40 +00:00
Luca Bruno
d06122c58d Add PermissionsStartOnly to mpd service. Closes #6277 2015-02-10 10:18:54 +01:00
Benno Fünfstück
914b76bad4 services.mpd: use systemd's user option
For some reason, mpd fails to open the sound card if using mpd's user
option. Starting mpd directly as the mpd user works for me.
2014-12-22 11:22:14 +00:00
Mateusz Kowalczyk
7fedb1baa6 Try fixing #4084 2014-09-21 07:04:01 +01:00
Dmitry Malikov
08cc8da65a mpd service: add network.{host,port} options
Closes #4084
2014-09-21 01:43:06 +01:00
third3ye
9c83a6bc76 Minor logic fix
music_directory     "${cfg.musicDirectory}"
playlist_directory  "${cfg.dataDir}/playlists"
db_file             "${cfg.dataDir}/tag_cache"
state_file          "${cfg.dataDir}/state"
sticker_file        "${cfg.dataDir}/sticker.sql"

all refer to ${cfg.datadir}, which by default is "/var/lib/mpd/". 

Parsing for instance ${cfg.datadir}/playlists results in:
/var/lib/mpd//playlists - NOT FOUND.
2014-06-17 03:24:39 +00:00
Eelco Dolstra
29027fd1e1 Rewrite ‘with pkgs.lib’ -> ‘with lib’
Using pkgs.lib on the spine of module evaluation is problematic
because the pkgs argument depends on the result of module
evaluation. To prevent an infinite recursion, pkgs and some of the
modules are evaluated twice, which is inefficient. Using ‘with lib’
prevents this problem.
2014-04-14 16:26:48 +02:00
Eelco Dolstra
5c1f8cbc70 Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
Renamed from modules/services/audio/mpd.nix (Browse further)