I recently set up my system but I cant get spotify working. it throws errors whenever i rebuild with it included. my configuration.nix:
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
vim
wget
alacritty
git
xclip
wl-clipboard
yazi
fzf
zsh
bash
spotify
];
It takes a long time to rebuild, retries several times and then throws these errors as the end result:
building the system configuration...
error: Cannot build '/nix/store/z277f91lra3n4wx15xv5schlb9hk7ga7-spotify-1.2.74.477.g3be53afe-89.snap.drv'.
Reason: builder failed with exit code 1.
Output paths:
/nix/store/y678qd67dlir3k1x1vwd0343cwzwbs2c-spotify-1.2.74.477.g3be53afe-89.snap
Last 17 log lines:
>
> trying https://api.snapcraft.io/api/v1/snaps/download/pOBIoZ2LrCB3rDohMxoYGnbN14EHOgD7_89.snap
> % Total % Received % Xferd Average Speed Time Time Time Current
> Dload Upload Total Spent Left Speed
> 0 0 0 0 0 0 0 0 05:00 0
> curl: (28) Connection timed out after 300686 milliseconds
> Warning: Problem : timeout. Will retry in 1 second. 3 retries left.
> 0 0 0 0 0 0 0 0 00:23 0
> curl: (35) Recv failure: Connection reset by peer
> Warning: Problem (retrying all errors). Will retry in 2 seconds. 2 retries
> Warning: left.
> 0 0 0 0 0 0 0 0 00:20 0
> curl: (35) Recv failure: Connection reset by peer
> Warning: Problem (retrying all errors). Will retry in 4 seconds. 1 retry left.
> 0 0 0 0 0 0 0 0 00:17 0
> curl: (35) Recv failure: Connection reset by peer
> error: cannot download spotify-1.2.74.477.g3be53afe-89.snap from any mirror
For full logs, run:
nix log /nix/store/z277f91lra3n4wx15xv5schlb9hk7ga7-spotify-1.2.74.477.g3be53afe-89.snap.drv
error: Cannot build '/nix/store/p7k3hg9qlnlx00payajws3xhgxz0zrwi-spotify-1.2.74.477.g3be53afe.drv'.
Reason: 1 dependency failed.
Output paths:
/nix/store/fd2p16x9h6g68xan1kp8lzgi06c3w8z2-spotify-1.2.74.477.g3be53afe
error: Cannot build '/nix/store/3qfd298p6vznyvh5m8qpn0gjaqrf3hfv-system-path.drv'.
Reason: 1 dependency failed.
Output paths:
/nix/store/bha75xxcmqj44w1rj9hksk1ip16knmyc-system-path
error: Cannot build '/nix/store/v11ws6hacc85k68kdkv66s5dynsv1i2z-nixos-system-nixos-btw-25.11.20260429.755f5aa.drv'.
Reason: 1 dependency failed.
Output paths:
/nix/store/h0b0l0qhrxxanbhybv04ilsaqgjds63r-nixos-system-nixos-btw-25.11.20260429.755f5aa
Command 'nix --extra-experimental-features 'nix-command flakes' build --print-out-paths '/home/vxb/nixos-dots#nixosConfigurations."nixos-btw".config.system.build.toplevel' --no-link' returned non-zero exit status 1.
I’m on the current stable version 25.11, and fetching it from the unstable repo and home manager seems no different. All of the other packages have built and installed just fine.