grimm-nixos-laptop/common/sound/spotify.nix

26 lines
446 B
Nix
Raw Permalink Normal View History

2024-05-07 23:31:41 +02:00
{
config,
lib,
pkgs,
...
}:
let
2024-05-11 22:55:59 +02:00
inherit (config.grimmShared) enable spotify graphical;
in
{
2024-05-11 22:55:59 +02:00
config = lib.mkIf (enable && spotify.enable) {
environment.systemPackages = [ pkgs.ncspot ] ++ lib.optional graphical pkgs.spotify;
2024-05-11 22:55:59 +02:00
grimmShared = {
sound.enable = true;
network = true;
};
2024-05-11 22:55:59 +02:00
};
options.grimmShared.spotify = {
enable = lib.mkEnableOption "grimm-spotify";
};
2024-05-07 23:31:41 +02:00
imports = [ ./spotifyd.nix ];
}