Merge pull request #59362 from matthiasbeyer/ympd-port-int

ympd service: Allow webPort to be int
This commit is contained in:
markuskowa 2019-04-12 20:59:13 +02:00 committed by GitHub
commit 7d363d46ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ in {
enable = mkEnableOption "ympd, the MPD Web GUI";
webPort = mkOption {
type = types.string;
type = types.either types.str types.port; # string for backwards compat
default = "8080";
description = "The port where ympd's web interface will be available.";
example = "ssl://8080:/path/to/ssl-private-key.pem";
@ -49,7 +49,7 @@ in {
systemd.services.ympd = {
description = "Standalone MPD Web GUI written in C";
wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = "${pkgs.ympd}/bin/ympd --host ${cfg.mpd.host} --port ${toString cfg.mpd.port} --webport ${cfg.webPort} --user nobody";
serviceConfig.ExecStart = "${pkgs.ympd}/bin/ympd --host ${cfg.mpd.host} --port ${toString cfg.mpd.port} --webport ${toString cfg.webPort} --user nobody";
};
};