From 97724f2a37b46b1bee4322653314f81942201d60 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Thu, 24 Mar 2022 19:47:26 -0400 Subject: [PATCH] Init spotify --- modules/applications/default.nix | 1 + modules/applications/spotify.nix | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 modules/applications/spotify.nix 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 ]; + }; +}