diff --git a/modules/applications/default.nix b/modules/applications/default.nix index 17f2b66..388d366 100644 --- a/modules/applications/default.nix +++ b/modules/applications/default.nix @@ -6,6 +6,7 @@ ./gnome-common.nix ./kitty.nix ./nextcloud.nix + ./spotify.nix ./sway ]; } diff --git a/modules/applications/spotify.nix b/modules/applications/spotify.nix new file mode 100644 index 0000000..f464c37 --- /dev/null +++ b/modules/applications/spotify.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.this.application.spotify; + graphical = config.this.graphical; +in with lib; { + options = { + this.application.spotify.enable = mkOption { + default = graphical.enable; + type = with types; bool; + }; + }; + + config = mkIf cfg.enable { + home-manager.users.james = { home.packages = with pkgs; [ spotify ]; }; + + # Local discovery - https://nixos.wiki/wiki/Spotify + networking.firewall.allowedTCPPorts = [ 57621 ]; + }; +}