feat: Use specitify instead of spotx

This commit is contained in:
ulic-youthlic 2026-02-21 14:43:08 +08:00
parent f812a13895
commit b275b19421
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
11 changed files with 107 additions and 56 deletions

67
flake.lock generated
View file

@ -865,6 +865,22 @@
"type": "github"
}
},
"nixpkgs_10": {
"locked": {
"lastModified": 1770107345,
"narHash": "sha256-tbS0Ebx2PiA1FRW8mt8oejR0qMXmziJmPaU1d4kYY9g=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "4533d9293756b63904b7238acb84ac8fe4c8c2c4",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1759381078,
@ -979,16 +995,16 @@
},
"nixpkgs_9": {
"locked": {
"lastModified": 1770107345,
"narHash": "sha256-tbS0Ebx2PiA1FRW8mt8oejR0qMXmziJmPaU1d4kYY9g=",
"owner": "nixos",
"lastModified": 1770197578,
"narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4533d9293756b63904b7238acb84ac8fe4c8c2c4",
"rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
@ -1142,6 +1158,7 @@
"nvchad-starter": "nvchad-starter",
"sops-nix": "sops-nix",
"spacemacs": "spacemacs",
"spicetify-nix": "spicetify-nix",
"stylix": "stylix",
"treefmt-nix": "treefmt-nix",
"zen-browser": "zen-browser"
@ -1225,6 +1242,25 @@
"type": "github"
}
},
"spicetify-nix": {
"inputs": {
"nixpkgs": "nixpkgs_9",
"systems": "systems_7"
},
"locked": {
"lastModified": 1771268051,
"narHash": "sha256-nGqPcngnezoT+/xAvw3UDjwdKP2MC4fO315A/Otb9eE=",
"owner": "Gerg-L",
"repo": "spicetify-nix",
"rev": "b930de84c561f62a0c39a6a57c2ab553a97e8495",
"type": "github"
},
"original": {
"owner": "Gerg-L",
"repo": "spicetify-nix",
"type": "github"
}
},
"stylix": {
"inputs": {
"base16": "base16",
@ -1240,7 +1276,7 @@
"nixpkgs"
],
"nur": "nur_2",
"systems": "systems_7",
"systems": "systems_8",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
@ -1366,6 +1402,21 @@
"type": "github"
}
},
"systems_8": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-foot": {
"flake": false,
"locked": {
@ -1449,7 +1500,7 @@
},
"treefmt-nix": {
"inputs": {
"nixpkgs": "nixpkgs_9"
"nixpkgs": "nixpkgs_10"
},
"locked": {
"lastModified": 1770228511,

View file

@ -240,5 +240,11 @@
nixpkgs.follows = "nixpkgs";
};
};
spicetify-nix = {
type = "github";
owner = "Gerg-L";
repo = "spicetify-nix";
};
};
}

View file

@ -43,6 +43,7 @@
wallpaper.enable = true;
accounts.email.enable = true;
programs = {
spotify.enable = true;
chromium.enable = true;
thunderbird.enable = true;
foot.enable = false;

View file

@ -0,0 +1,40 @@
{
config,
lib,
inputs,
pkgs,
...
}: let
cfg = config.david.programs.spotify;
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in {
options = {
david.programs.spotify = {
enable = lib.mkEnableOption "spotify";
};
};
config = lib.mkIf cfg.enable {
stylix.targets.spicetify.enable = false;
programs.spicetify = {
enable = true;
wayland = true;
windowManagerPatch = true;
enabledExtensions = with spicePkgs.extensions; [
sort-play
allOfArtist
sleepTimer
coverAmbience
beautifulLyrics
sectionMarker
playingSource
adblock
history
copyToClipboard
songStats
playNext
];
theme = spicePkgs.themes.catppuccin;
colorScheme = "mocha";
};
};
}

View file

@ -10,6 +10,7 @@
nix4nvchad.homeManagerModule
noctalia.homeModules.default
zen-browser.homeModules.twilight
spicetify-nix.homeManagerModules.spicetify
])
++ lib.youthlic.loadImports ./.;

View file

@ -55,7 +55,6 @@
kdePackages.neochat
vlc
btop
spotify
localsend
zulip
wechat

View file

@ -105,7 +105,6 @@
handbrake
wechat-uos
nvtopPackages.full
spotify
localsend
jq
onefetch

View file

@ -1,7 +1,3 @@
[spotx]
fetch.github = "SpotX-Official/SpotX-Bash"
src.git = "https://github.com/SpotX-Official/SpotX-Bash.git"
[TrackersListCollection]
fetch.github = "XIU2/TrackersListCollection"
src.git = "https://github.com/XIU2/TrackersListCollection.git"

View file

@ -5,7 +5,6 @@ in
pipe
[
./niri.nix
./spotifyx.nix
./radicle-explorer.nix
./wshowkeys.nix
# ./QQ.nix

View file

@ -1,5 +0,0 @@
{outputs, ...}: _final: prev: let
inherit (prev.stdenv.hostPlatform) system;
in {
spotify = outputs.packages."${system}".spotifyx;
}

View file

@ -1,36 +0,0 @@
{
spotify,
unzip,
zip,
perl,
makeWrapper,
srcs,
}: let
inherit (srcs) spotx;
in
spotify.overrideAttrs (
_final: prev: {
nativeBuildInputs =
prev.nativeBuildInputs
++ [
unzip
zip
perl
makeWrapper
];
spotx = spotx.src;
postUnpack = ''
cp $spotx/spotx.sh ./spotx.sh
chmod +x ./spotx.sh
patchShebangs --build ./spotx.sh
'';
postInstall = ''
./spotx.sh -P $out/share/spotify -h -p
'';
postFixup = ''
wrapProgram $out/bin/spotify \
--set NIXOS_OZONE_WL 1 \
--add-flags '--wayland-text-input-version=3'
'';
}
)