feat: add spotify with spotx patch applied
This commit is contained in:
parent
d698c9b7d7
commit
d4c1fd085b
34
modules/home/applications/spotify.nix
Normal file
34
modules/home/applications/spotify.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) getExe mkEnableOption mkIf;
|
||||
cfg = config.ataraxia.programs.spotify;
|
||||
in
|
||||
{
|
||||
options.ataraxia.programs.spotify = {
|
||||
enable = mkEnableOption "Enable spotify program";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
spotifywm
|
||||
];
|
||||
|
||||
defaultApplications.spotify = {
|
||||
cmd = getExe pkgs.spotifywm;
|
||||
desktop = "spotify";
|
||||
};
|
||||
|
||||
startupApplications = [
|
||||
config.defaultApplications.spotify.cmd
|
||||
];
|
||||
|
||||
persist.state.directories = [
|
||||
".config/spotify"
|
||||
];
|
||||
};
|
||||
}
|
@ -83,6 +83,7 @@ in
|
||||
ataraxia.programs.kitty.enable = mkDefault true;
|
||||
ataraxia.programs.mpv.enable = mkDefault true;
|
||||
ataraxia.programs.rofi.enable = mkDefault true;
|
||||
ataraxia.programs.spotify.enable = mkDefault true;
|
||||
ataraxia.programs.telegram.enable = mkDefault true;
|
||||
ataraxia.programs.thunderbird.enable = mkDefault true;
|
||||
ataraxia.programs.vscode.enable = mkDefault true;
|
||||
|
@ -34,6 +34,37 @@ in
|
||||
sing-box = unstable.sing-box;
|
||||
wine = prev.wineWow64Packages.stagingFull;
|
||||
|
||||
# Patch spotify with spotx
|
||||
spotify = prev.spotify.overrideAttrs (
|
||||
oa:
|
||||
let
|
||||
spotx = prev.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/SpotX-Official/SpotX-Bash/b1de24ec4c23c45da373dcb64a44e372253a0c16/spotx.sh";
|
||||
hash = "sha256-/p6cJKzaZzjcLJISFudstQjs+lPXnXx4f0vxKbF9Sqw=";
|
||||
};
|
||||
in
|
||||
{
|
||||
nativeBuildInputs =
|
||||
oa.nativeBuildInputs
|
||||
++ (with prev; [
|
||||
perl
|
||||
unzip
|
||||
util-linux
|
||||
zip
|
||||
]);
|
||||
postUnpack =
|
||||
oa.postUnpack or ""
|
||||
+ ''
|
||||
patchShebangs --build ${spotx}
|
||||
'';
|
||||
postInstall =
|
||||
oa.postInstall or ""
|
||||
+ ''
|
||||
bash ${spotx} -f -h -P "$out/share/spotify"
|
||||
'';
|
||||
}
|
||||
);
|
||||
|
||||
# Move modprobed config to subdir. Easier to use with impermanence
|
||||
modprobed-db = prev.modprobed-db.overrideAttrs (oa: {
|
||||
nativeBuildInputs = [ prev.makeWrapper ] ++ oa.nativeBuildInputs or [ ];
|
||||
|
Loading…
x
Reference in New Issue
Block a user