From 2d155643bad02a834884b2a4264ba3177c52ca5d Mon Sep 17 00:00:00 2001 From: Frantisek Bohacek Date: Wed, 31 Jul 2024 13:55:17 +0200 Subject: [PATCH] feat: add spicetify --- flake.lock | 38 ++++++++++++++++++++++++++++++++++++++ flake.nix | 5 +++++ home/default.nix | 19 +++++++++++++++---- 3 files changed, 58 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index b42c77b..caead0c 100644 --- a/flake.lock +++ b/flake.lock @@ -49,6 +49,22 @@ "type": "github" } }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -377,6 +393,7 @@ "noshell": "noshell", "nur": "nur", "schizofox": "schizofox", + "spicetify": "spicetify", "wrapper-manager": "wrapper-manager" } }, @@ -426,6 +443,27 @@ "type": "github" } }, + "spicetify": { + "inputs": { + "flake-compat": "flake-compat_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722426629, + "narHash": "sha256-w5V6pQFhX+beK2BxIvutyOxRaw4YEcLiLqRLaDP8O94=", + "owner": "Gerg-L", + "repo": "spicetify-nix", + "rev": "2842897718c8b79fd9614bf3c001e08a7516caf4", + "type": "github" + }, + "original": { + "owner": "Gerg-L", + "repo": "spicetify-nix", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index d951d0d..c634238 100644 --- a/flake.nix +++ b/flake.nix @@ -56,6 +56,11 @@ url = "github:NotAShelf/schizofox"; inputs.nixpkgs.follows = "nixpkgs"; }; + + spicetify = { + url = "github:Gerg-L/spicetify-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = inputs @ { self, nixpkgs, nixpkgs-stable, nix-index-database, home-manager, nur, nixos-hardware, lanzaboote, ... }: diff --git a/home/default.nix b/home/default.nix index 8e78625..cfdbc3f 100644 --- a/home/default.nix +++ b/home/default.nix @@ -9,10 +9,6 @@ let inherit pkgs; modules = [ ({ pkgs, ... }: { - wrappers.spotify = { - basePackage = pkgs.spotify; - flags = electronWaylandFlags; - }; wrappers.element = { basePackage = pkgs.element-desktop; flags = electronWaylandFlags; @@ -29,8 +25,23 @@ in { ./modules ../nixos/modules/nixos-config.nix ./laptop.nix + + inputs.spicetify.homeManagerModules.default ]; + programs.spicetify = let + spicePkgs = inputs.spicetify.legacyPackages.${pkgs.system}; + in { + enable = true; + enabledExtensions = with spicePkgs.extensions; [ + adblock + shuffle + keyboardShortcut + ]; + theme = spicePkgs.themes.catppuccin; + colorScheme = "mocha"; + }; + nix.registry = lib.mapAttrs (n: input: { flake = input; }) inputs; -- 2.48.1