Skip to content

Commit

Permalink
[spotify] add a module
Browse files Browse the repository at this point in the history
  • Loading branch information
ejiek committed Nov 7, 2023
1 parent 12248c4 commit 0392130
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions hosts/ePower/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
./qutebrowser
./rbw
./rofi
./spotify
./starship
./steam
./tailscale
Expand Down
25 changes: 25 additions & 0 deletions modules/spotify/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
};
}

0 comments on commit 0392130

Please sign in to comment.