diff --git a/hosts/ePower/default.nix b/hosts/ePower/default.nix index 62a5237..f4b84aa 100644 --- a/hosts/ePower/default.nix +++ b/hosts/ePower/default.nix @@ -67,6 +67,7 @@ rbw.enable = true; rofi.enable = true; qutebrowser.enable = true; + spotify.enable = true; starship.enable = true; steam.enable = true; tailscale.enable = true; diff --git a/modules/default.nix b/modules/default.nix index 223b4d9..41d6a4c 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -21,6 +21,7 @@ ./qutebrowser ./rbw ./rofi + ./spotify ./starship ./steam ./tailscale diff --git a/modules/spotify/default.nix b/modules/spotify/default.nix new file mode 100644 index 0000000..b933e03 --- /dev/null +++ b/modules/spotify/default.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, ... }: +let inherit (lib) types mkIf mkDefault mkOption; +in { + options.my-config = { + spotify.enable = mkOption { + description = "Enable obsidian"; + type = types.bool; + default = false; + }; + spotify.discovery = mkOption { + description = "Spotify Connect"; + type = types.bool; + default = false; + }; + }; + + config = mkIf config.my-config.spotify.enable { + environment.systemPackages = with pkgs; [ spotify ]; + nixpkgs.allowUnfreePackages = [ "spotify" ]; + networking.firewall = { + allowedTCPPorts = [ 57621 ]; + allowedUDPPorts = [ 5353 ]; + }; + }; +}