Skip to content

Commit 690e145

Browse files
committed
feat(programs): add spotify
1 parent f2d76cf commit 690e145

File tree

4 files changed

+126
-1
lines changed

4 files changed

+126
-1
lines changed

flake.lock

+39-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
url = "github:ezKEa/aagl-gtk-on-nix";
2727
inputs.nixpkgs.follows = "nixpkgs";
2828
};
29+
spicetify = {
30+
url = "github:Gerg-L/spicetify-nix";
31+
inputs.nixpkgs.follows = "nixpkgs";
32+
};
2933
};
3034

3135
outputs = {

modules/programs/spotify.nix

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
module-functions,
3+
hm,
4+
pkgs,
5+
inputs,
6+
config,
7+
...
8+
}:
9+
module-functions.moduleIfEnabledFinally "programs" "spotify" (let
10+
spicePkgs = inputs.spicetify.legacyPackages.${pkgs.system};
11+
in {
12+
hm.programs.spicetify = {
13+
enable = true;
14+
alwaysEnableDevTools = true;
15+
16+
theme = spicePkgs.themes.text;
17+
colorScheme = "custom";
18+
customColorScheme = with config.yunfachi.rice.colorscheme; {
19+
accent = base0B.value;
20+
accent-active = base0B.value;
21+
accent-inactive = base00.value;
22+
banner = base0B.value;
23+
border-active = base0B.value;
24+
border-inactive = base03.value;
25+
header = base04.value;
26+
highlight = base04.value;
27+
main = base00.value;
28+
notification = base0D.value;
29+
notification-error = base08.value;
30+
subtext = base06.value;
31+
text = base05.value;
32+
};
33+
34+
enabledSnippets = with spicePkgs.snippets; [
35+
hideFriendActivityButton
36+
hideFullScreenButton
37+
roundedImages
38+
".Root__top-container:has([class*='yourLibraryX']) { padding-top: 16px; }"
39+
"button.encore-text-body-medium-bold.encore-over-media-set > figure > div > img { border-radius: 50% !important; }"
40+
".player-controls__buttons,.main-nowPlayingBar-extraControls { opacity: .4; }"
41+
];
42+
43+
enabledExtensions = with spicePkgs.extensions; [
44+
adblockify
45+
hidePodcasts
46+
shuffle
47+
skipStats
48+
];
49+
50+
enabledCustomApps = with spicePkgs.apps; [
51+
marketplace
52+
ncsVisualizer
53+
{
54+
src = pkgs.fetchzip {
55+
# https://github.com/harbassan/spicetify-apps/releases
56+
url = "https://github.com/harbassan/spicetify-apps/releases/download/stats-v1.1.0/spicetify-stats.release.zip";
57+
hash = "sha256-m0lsxNV4rC3FAmPQxmCZGzdNBsEC/q3LXR90VhGjrJM=";
58+
};
59+
name = "stats";
60+
}
61+
{
62+
src = pkgs.fetchzip {
63+
# https://github.com/Pithaya/spicetify-apps-dist/tree/dist/eternal-jukebox
64+
url = "https://github.com/Pithaya/spicetify-apps-dist/archive/d643d2c4c3824a8ce22142c68431bec5af6d1fcb.zip";
65+
hash = "sha256-My1TuuFeih3QgaU8Nfv8ocIzE55ypM/QmfCt4RPy/5g=";
66+
};
67+
name = "eternal-jukebox";
68+
}
69+
];
70+
};
71+
})
72+
{
73+
hm.imports = [inputs.spicetify.homeManagerModules.default];
74+
}

options/programs/spotify.nix

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
option-functions,
3+
host,
4+
...
5+
}:
6+
with option-functions;
7+
option "programs" "spotify" {
8+
enable = enableOption "spotify" host.isDesktop;
9+
}

0 commit comments

Comments
 (0)