mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 17:03:55 -05:00
home: added mpd service
This commit is contained in:
parent
ae5794f7a8
commit
16b6599c4d
|
@ -4,7 +4,7 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [./syncthing ./easyeffects];
|
imports = [./syncthing ./easyeffects ./mpd];
|
||||||
|
|
||||||
userServices.syncthing.enable = lib.mkDefault true;
|
userServices.syncthing.enable = lib.mkDefault true;
|
||||||
}
|
}
|
||||||
|
|
27
homeManagerModules/userServices/mpd/default.nix
Normal file
27
homeManagerModules/userServices/mpd/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
options = {
|
||||||
|
userServices.mpd.enable =
|
||||||
|
lib.mkEnableOption "MPD user service.";
|
||||||
|
userServices.mpd.musicDirectory = lib.mkOption {
|
||||||
|
description = "Name of music directory";
|
||||||
|
default = config.xdg.userDirs.music;
|
||||||
|
type = lib.types.str;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.userServices.mpd.enable {
|
||||||
|
services.mpd = {
|
||||||
|
enable = true;
|
||||||
|
musicDirectory = config.userServices.mpd.musicDirectory;
|
||||||
|
};
|
||||||
|
services.mpd-mpris = {
|
||||||
|
enable = true;
|
||||||
|
mpd.port = config.services.mpd.network.port;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue