add spotify webapp
This commit is contained in:
parent
5ed4c41898
commit
72006f56b1
8 changed files with 159 additions and 4 deletions
39
flake.lock
generated
39
flake.lock
generated
|
|
@ -441,7 +441,29 @@
|
|||
"nixvim": "nixvim",
|
||||
"noctalia": "noctalia",
|
||||
"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": {
|
||||
|
|
@ -459,6 +481,21 @@
|
|||
"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": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
|
|
|||
10
flake.nix
10
flake.nix
|
|
@ -36,6 +36,11 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
spicetify-nix = {
|
||||
url = "github:Gerg-L/spicetify-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nur = {
|
||||
url = "github:nix-community/NUR";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
@ -62,6 +67,7 @@
|
|||
plasma-manager,
|
||||
niri,
|
||||
noctalia,
|
||||
spicetify-nix,
|
||||
nur,
|
||||
nixvim,
|
||||
apple-silicon,
|
||||
|
|
@ -105,8 +111,12 @@
|
|||
plasma-manager.homeModules.plasma-manager
|
||||
niri.homeModules.niri
|
||||
noctalia.homeModules.default
|
||||
spicetify-nix.homeManagerModules.default
|
||||
nixvim.homeModules.nixvim
|
||||
];
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit spicetify-nix;
|
||||
};
|
||||
}
|
||||
]
|
||||
++ extraModules;
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@
|
|||
spotdl
|
||||
browsh
|
||||
mosh
|
||||
spotify-player
|
||||
|
||||
# development & tooling
|
||||
gh
|
||||
|
|
@ -163,7 +164,7 @@
|
|||
musescore
|
||||
gimp
|
||||
calibre
|
||||
spotify-player
|
||||
spotify-qt
|
||||
|
||||
# overrides
|
||||
# (chromium.override {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
spicetify-nix,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
catppuccin = {
|
||||
|
|
@ -31,6 +36,31 @@
|
|||
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 = {
|
||||
panels = [
|
||||
# Alternative global menu to fit the modified taskbar
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
asahi-wifisync
|
||||
|
||||
moonlight-qt
|
||||
spotify-webapp
|
||||
];
|
||||
|
||||
# https://github.com/YaLTeR/niri/issues/2330#issuecomment-3256864777
|
||||
|
|
|
|||
|
|
@ -24,5 +24,7 @@ final: prev: {
|
|||
inherit helium-widevine;
|
||||
};
|
||||
|
||||
spotify-webapp = prev.callPackage (builtins.path { path = ./spotify/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="
|
||||
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
||||
];
|
||||
boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-latest;
|
||||
boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-lts;
|
||||
|
||||
programs = {
|
||||
gamescope = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue