From 300aa2c87431fe93bbeae43801ca67f0f406d08b Mon Sep 17 00:00:00 2001 From: Alexandre Date: Sat, 13 Dec 2025 11:38:52 +0100 Subject: [PATCH] Added Spotify and Spicetify --- flake.nix | 3 +++ hosts/nixos/home.nix | 6 ++++++ modules/common/spotify.nix | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 modules/common/spotify.nix diff --git a/flake.nix b/flake.nix index 70953a9..b14fda3 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,9 @@ # Hyprland hyprland.url = "github:hyprwm/Hyprland"; + # Spicetify + spicetify-nix.url = "github:Gerg-L/spicetify-nix"; + nix-darwin = { url = "github:nix-darwin/nix-darwin/master"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/nixos/home.nix b/hosts/nixos/home.nix index d3f729d..0b0dd12 100644 --- a/hosts/nixos/home.nix +++ b/hosts/nixos/home.nix @@ -6,6 +6,12 @@ home.username = "alex"; home.homeDirectory = "/home/alex"; + import = [ + # Different imports + # Spotify + ../../common/spotify.nix + ]; + # Hyprland wayland.windowManager.hyprland = { enable = true; diff --git a/modules/common/spotify.nix b/modules/common/spotify.nix new file mode 100644 index 0000000..7e12385 --- /dev/null +++ b/modules/common/spotify.nix @@ -0,0 +1,36 @@ +{ pkgs, inputs, ... }: + +{ + # Installs Spotify and Spicetify (import this module in homeManager) + environment.systemPackages = with pkgs; [ + spotify + ]; + + # Local discovery + networking.firewall.allowedTCPPorts = [ 57621 ]; + + # Spotify Connect + networking.firewall.allowedUDPPorts = [ 5353 ]; + + # Spicetify + programs.spicetify = + let + spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system}; + in + { + enable = true; + + enabledCustomApps = with spicePkgs.apps; [ + newReleases + ncsVisualiser + ]; + + enabledSnippets = with spicePkgs.snippets; [ + rotatingCoverart + pointer + ]; + + theme = spicePkgs.themes.catppuccin; + colorScheme = "mocha"; + } +}