grimm-nixos-laptop/common/sound/spotify.nix
2024-05-07 23:31:41 +02:00

28 lines
447 B
Nix

{
config,
lib,
pkgs,
...
}:
let
cfg = config.grimmShared;
in
{
config =
with cfg;
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 ];
}