summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominique Martinet @ ullr <asmadeus@codewreck.org>2020-09-06 12:39:48 +0200
committerDominique Martinet @ ullr <asmadeus@codewreck.org>2020-09-06 12:39:48 +0200
commite0803c0fdc643f0867864602bac29f8ec03da221 (patch)
tree354c01f3703fdc5d8519560cb10fc929595ba031
parent8e7525edaa19f4fff1a5c748047c62bf937bd9dd (diff)
mpd service: workaround no longer required on 20.09, yay!
-rw-r--r--modules/services/mpd.nix43
1 files changed, 0 insertions, 43 deletions
diff --git a/modules/services/mpd.nix b/modules/services/mpd.nix
deleted file mode 100644
index 68090f3..0000000
--- a/modules/services/mpd.nix
+++ /dev/null
@@ -1,43 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with lib;
-let
-
- cfg = config.services.mpd;
- # we want to remove user attr see https://github.com/NixOS/nixpkgs/pull/87418
- # user gets in the way of confinement
- mpdConf = pkgs.writeText "mpd.conf" ''
- music_directory "${cfg.musicDirectory}"
- playlist_directory "${cfg.playlistDirectory}"
- ${lib.optionalString (cfg.dbFile != null) ''
- db_file "${cfg.dbFile}"
- ''}
- state_file "${cfg.dataDir}/state"
- sticker_file "${cfg.dataDir}/sticker.sql"
-
- ${optionalString (cfg.network.listenAddress != "any") ''bind_to_address "${cfg.network.listenAddress}"''}
- ${optionalString (cfg.network.port != 6600) ''port "${toString cfg.network.port}"''}
- ${optionalString (cfg.fluidsynth) ''
- decoder {
- plugin "fluidsynth"
- soundfont "${pkgs.soundfont-fluid}/share/soundfonts/FluidR3_GM2-2.sf2"
- }
- ''}
-
- ${cfg.extraConfig}
- '';
-
-in {
- # see https://github.com/NixOS/nixpkgs/pull/87270
- # once 'user' part landed it might be possible to extend extraConfig?
- # who am I kidding...
- options.services.mpd.fluidsynth = mkOption {
- type = types.bool;
- default = false;
- description = ''
- If set, add fluidsynth soundfont and configure the plugin.
- '';
- };
-
- config.systemd.services.mpd.serviceConfig.ExecStart = mkForce "${pkgs.mpd}/bin/mpd --no-daemon ${mpdConf}";
-}