add spotify webapp
This commit is contained in:
parent
db416ee93a
commit
2201b838bf
8 changed files with 159 additions and 4 deletions
39
flake.lock
generated
39
flake.lock
generated
|
|
@ -441,7 +441,29 @@
|
||||||
"nixvim": "nixvim",
|
"nixvim": "nixvim",
|
||||||
"noctalia": "noctalia",
|
"noctalia": "noctalia",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"plasma-manager": "plasma-manager"
|
"plasma-manager": "plasma-manager",
|
||||||
|
"spicetify-nix": "spicetify-nix"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"spicetify-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1765687197,
|
||||||
|
"narHash": "sha256-5aJgT+lEC7ypuAGE3DQLj3LzYDQ+kRG6MnkVr3ZF9RU=",
|
||||||
|
"owner": "Gerg-L",
|
||||||
|
"repo": "spicetify-nix",
|
||||||
|
"rev": "fa6a5dde9d95bf7b8f075ff5aceeb1d97fa9043a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Gerg-L",
|
||||||
|
"repo": "spicetify-nix",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
|
|
@ -459,6 +481,21 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"xwayland-satellite-stable": {
|
"xwayland-satellite-stable": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
|
||||||
10
flake.nix
10
flake.nix
|
|
@ -36,6 +36,11 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
spicetify-nix = {
|
||||||
|
url = "github:Gerg-L/spicetify-nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
nur = {
|
nur = {
|
||||||
url = "github:nix-community/NUR";
|
url = "github:nix-community/NUR";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
@ -62,6 +67,7 @@
|
||||||
plasma-manager,
|
plasma-manager,
|
||||||
niri,
|
niri,
|
||||||
noctalia,
|
noctalia,
|
||||||
|
spicetify-nix,
|
||||||
nur,
|
nur,
|
||||||
nixvim,
|
nixvim,
|
||||||
apple-silicon,
|
apple-silicon,
|
||||||
|
|
@ -105,8 +111,12 @@
|
||||||
plasma-manager.homeModules.plasma-manager
|
plasma-manager.homeModules.plasma-manager
|
||||||
niri.homeModules.niri
|
niri.homeModules.niri
|
||||||
noctalia.homeModules.default
|
noctalia.homeModules.default
|
||||||
|
spicetify-nix.homeManagerModules.default
|
||||||
nixvim.homeModules.nixvim
|
nixvim.homeModules.nixvim
|
||||||
];
|
];
|
||||||
|
home-manager.extraSpecialArgs = {
|
||||||
|
inherit spicetify-nix;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
++ extraModules;
|
++ extraModules;
|
||||||
|
|
|
||||||
|
|
@ -125,6 +125,7 @@
|
||||||
spotdl
|
spotdl
|
||||||
browsh
|
browsh
|
||||||
mosh
|
mosh
|
||||||
|
spotify-player
|
||||||
|
|
||||||
# development & tooling
|
# development & tooling
|
||||||
gh
|
gh
|
||||||
|
|
@ -163,7 +164,7 @@
|
||||||
musescore
|
musescore
|
||||||
gimp
|
gimp
|
||||||
calibre
|
calibre
|
||||||
spotify-player
|
spotify-qt
|
||||||
|
|
||||||
# overrides
|
# overrides
|
||||||
# (chromium.override {
|
# (chromium.override {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
{ config, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
spicetify-nix,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
catppuccin = {
|
catppuccin = {
|
||||||
|
|
@ -31,6 +36,31 @@
|
||||||
scale = 1.75;
|
scale = 1.75;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.spicetify =
|
||||||
|
let
|
||||||
|
spicePkgs = spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
enabledExtensions = with spicePkgs.extensions; [
|
||||||
|
adblock
|
||||||
|
hidePodcasts
|
||||||
|
shuffle # shuffle+ (special characters are sanitized out of extension names)
|
||||||
|
];
|
||||||
|
enabledCustomApps = with spicePkgs.apps; [
|
||||||
|
newReleases
|
||||||
|
ncsVisualizer
|
||||||
|
];
|
||||||
|
enabledSnippets = with spicePkgs.snippets; [
|
||||||
|
rotatingCoverart
|
||||||
|
pointer
|
||||||
|
];
|
||||||
|
|
||||||
|
theme = spicePkgs.themes.catppuccin;
|
||||||
|
colorScheme = config.catppuccin.flavor;
|
||||||
|
};
|
||||||
|
|
||||||
programs.plasma = {
|
programs.plasma = {
|
||||||
panels = [
|
panels = [
|
||||||
# Alternative global menu to fit the modified taskbar
|
# Alternative global menu to fit the modified taskbar
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
asahi-wifisync
|
asahi-wifisync
|
||||||
|
|
||||||
moonlight-qt
|
moonlight-qt
|
||||||
|
spotify-webapp
|
||||||
];
|
];
|
||||||
|
|
||||||
# https://github.com/YaLTeR/niri/issues/2330#issuecomment-3256864777
|
# https://github.com/YaLTeR/niri/issues/2330#issuecomment-3256864777
|
||||||
|
|
|
||||||
|
|
@ -24,5 +24,7 @@ final: prev: {
|
||||||
inherit helium-widevine;
|
inherit helium-widevine;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
spotify-webapp = prev.callPackage (builtins.path { path = ./spotify/package.nix; }) { };
|
||||||
|
|
||||||
spotifyd = prev.callPackage (builtins.path { path = ./spotifyd/package.nix; }) { };
|
spotifyd = prev.callPackage (builtins.path { path = ./spotifyd/package.nix; }) { };
|
||||||
}
|
}
|
||||||
|
|
|
||||||
74
packages/spotify/package.nix
Normal file
74
packages/spotify/package.nix
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
makeDesktopItem,
|
||||||
|
copyDesktopItems,
|
||||||
|
chromium,
|
||||||
|
writeShellScriptBin,
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
pname = "spotify-webapp";
|
||||||
|
version = "1.0.0";
|
||||||
|
|
||||||
|
chromiumWithWidevine = chromium.override {
|
||||||
|
enableWideVine = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
launchScript = writeShellScriptBin "spotify-webapp" ''
|
||||||
|
exec ${chromiumWithWidevine}/bin/chromium \
|
||||||
|
--app=https://open.spotify.com \
|
||||||
|
--class=spotify-webapp \
|
||||||
|
--name=spotify-webapp \
|
||||||
|
--user-data-dir="$HOME/.config/spotify-webapp" \
|
||||||
|
--enable-features=UseOzonePlatform \
|
||||||
|
--ozone-platform=wayland \
|
||||||
|
"$@"
|
||||||
|
'';
|
||||||
|
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
inherit pname version;
|
||||||
|
|
||||||
|
dontUnpack = true;
|
||||||
|
dontBuild = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ copyDesktopItems ];
|
||||||
|
|
||||||
|
desktopItems = [
|
||||||
|
(makeDesktopItem {
|
||||||
|
name = "spotify-webapp";
|
||||||
|
exec = "spotify-webapp %U";
|
||||||
|
icon = "spotify";
|
||||||
|
desktopName = "Spotify";
|
||||||
|
genericName = "Music Streaming";
|
||||||
|
comment = "Listen to music on Spotify";
|
||||||
|
categories = [
|
||||||
|
"Audio"
|
||||||
|
"Music"
|
||||||
|
"AudioVideo"
|
||||||
|
];
|
||||||
|
mimeTypes = [ "x-scheme-handler/spotify" ];
|
||||||
|
startupWMClass = "spotify-webapp";
|
||||||
|
startupNotify = true;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/bin
|
||||||
|
ln -s ${launchScript}/bin/spotify-webapp $out/bin/spotify-webapp
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Spotify web app running in Chromium";
|
||||||
|
homepage = "https://open.spotify.com";
|
||||||
|
license = licenses.free;
|
||||||
|
maintainers = [ ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
mainProgram = "spotify-webapp";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -46,7 +46,7 @@
|
||||||
"lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc="
|
"lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc="
|
||||||
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
||||||
];
|
];
|
||||||
boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-latest;
|
boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-lts;
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
gamescope = {
|
gamescope = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue