26 lines
446 B
Nix
26 lines
446 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
inherit (config.grimmShared) enable spotify graphical;
|
|
in
|
|
{
|
|
config = lib.mkIf (enable && spotify.enable) {
|
|
environment.systemPackages = [ pkgs.ncspot ] ++ lib.optional graphical pkgs.spotify;
|
|
|
|
grimmShared = {
|
|
sound.enable = true;
|
|
network = true;
|
|
};
|
|
};
|
|
|
|
options.grimmShared.spotify = {
|
|
enable = lib.mkEnableOption "grimm-spotify";
|
|
};
|
|
|
|
imports = [ ./spotifyd.nix ];
|
|
}
|