Skip to content

Commit

Permalink
feat(home-manager): add support for spotify-player (#296)
Browse files Browse the repository at this point in the history
* feat(home-manager): add support for spotify-player

* fix: make use of `inherit`

Co-authored-by: seth <getchoo@tuta.io>

* feat(spotify-player): enable in tests

* chore: update spotify-player input

---------

Co-authored-by: seth <getchoo@tuta.io>
  • Loading branch information
w-lfchen and getchoo authored Aug 19, 2024
1 parent 32326f7 commit ff4128f
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .sources/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,18 @@
"url": "https://github.com/catppuccin/skim/archive/d39304b5f84721788b19bc40aebcfd7720208d8a.tar.gz",
"hash": "1b6cd1wfkprrn7imgf1w1f9a6iqy3bql2ansy7l0k44ps1gwrvxq"
},
"spotify-player": {
"type": "Git",
"repository": {
"type": "GitHub",
"owner": "catppuccin",
"repo": "spotify-player"
},
"branch": "main",
"revision": "34b3d23806770185b72466d777853c73454b85a6",
"url": "https://github.com/catppuccin/spotify-player/archive/34b3d23806770185b72466d777853c73454b85a6.tar.gz",
"hash": "15cz4x432681zwik8dwmjljj628v540c1fz1m4v6nvvw63bdzsbr"
},
"starship": {
"type": "Git",
"repository": {
Expand Down
1 change: 1 addition & 0 deletions modules/home-manager/all-modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
./rio.nix
./rofi.nix
./skim.nix
./spotify-player.nix
./starship.nix
./swaylock.nix
./sway.nix
Expand Down
16 changes: 16 additions & 0 deletions modules/home-manager/spotify-player.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{ config, lib, ... }:
let
inherit (config.catppuccin) sources;
cfg = config.programs.spotify-player.catppuccin;
enable = cfg.enable && config.programs.spotify-player.enable;
in
{
options.programs.spotify-player.catppuccin = lib.ctp.mkCatppuccinOpt { name = "spotify-player"; };

config = lib.mkIf enable {
programs.spotify-player = {
settings.theme = "Catppuccin-${cfg.flavor}";
inherit (lib.importTOML "${sources.spotify-player}/theme.toml") themes;
};
};
}
1 change: 1 addition & 0 deletions tests/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
rio.enable = true;
rofi.enable = true;
skim.enable = true;
spotify-player.enable = true;
starship.enable = true;
swaylock.enable = true;
tmux.enable = true;
Expand Down

0 comments on commit ff4128f

Please sign in to comment.