mpd: configurable executable package
This commit is contained in:
parent
b5291e995f
commit
99fbae0ec5
|
@ -41,6 +41,15 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.mpd;
|
||||||
|
defaultText = "pkgs.mpd";
|
||||||
|
description = ''
|
||||||
|
The MPD package to run.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
musicDirectory = mkOption {
|
musicDirectory = mkOption {
|
||||||
type = with types; either path str;
|
type = with types; either path str;
|
||||||
default = "${config.home.homeDirectory}/music";
|
default = "${config.home.homeDirectory}/music";
|
||||||
|
@ -140,7 +149,7 @@ in {
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
Environment = "PATH=${config.home.profileDirectory}/bin";
|
Environment = "PATH=${config.home.profileDirectory}/bin";
|
||||||
ExecStart = "${pkgs.mpd}/bin/mpd --no-daemon ${mpdConf}";
|
ExecStart = "${cfg.package}/bin/mpd --no-daemon ${mpdConf}";
|
||||||
Type = "notify";
|
Type = "notify";
|
||||||
ExecStartPre = ''${pkgs.bash}/bin/bash -c "${pkgs.coreutils}/bin/mkdir -p '${cfg.dataDir}' '${cfg.playlistDirectory}'"'';
|
ExecStartPre = ''${pkgs.bash}/bin/bash -c "${pkgs.coreutils}/bin/mkdir -p '${cfg.dataDir}' '${cfg.playlistDirectory}'"'';
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue