Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spotifyd package and service #65092

Merged
merged 3 commits into from Jul 23, 2019
Merged

Add spotifyd package and service #65092

merged 3 commits into from Jul 23, 2019

Conversation

anderslundstedt
Copy link
Contributor

@anderslundstedt anderslundstedt commented Jul 19, 2019

Motivation for this change

Spotifyd is a nice spotify connect server. This adds a spotifyd package and a spotifyd service.

I took over the abandoned #55923, addressing the comments to the best of my ability. I am not very experienced with adding packages or services to NixOS, so likely there are still things to address.

Additional comments

Here are the differences between this pull request and #55923:

  • In the package:

    • Version bumped to 0.2.11, which also eliminates the need for the noavxcrypto.patch patch.

    • platforms.unix instead of platforms.all.

  • In the service module:

    • As suggested by a comment, removed the dataDir option. As far as I can see, this option does indeed seem unnecessary.

    • As suggested by a comment, use command line option --cache_path /var/lib/spotifyd instead of setting Environment = "HOME=/var/lib/spotifyd".

    • Added spotifyd user belonging to the audio group. (Did not work for me without this.)

Unresolved #55923 comments not addressed by the above changes:

  • Using lib.generators.toINI to generate the config line from the config service option. I did not feel I had the competence to make such a change (and it is not clear to me why such a change would be preferable).

  • Dropping the --no-daemon from the service start. I tried this which resulted in the service crashing.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Member

@aanderse aanderse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've included some suggestions I hope will be helpful. Please let me know if you have any questions.

maintainers/maintainer-list.nix Show resolved Hide resolved
nixos/modules/services/audio/spotifyd.nix Outdated Show resolved Hide resolved
pkgs/applications/audio/spotifyd/default.nix Outdated Show resolved Hide resolved
pkgs/applications/audio/spotifyd/default.nix Outdated Show resolved Hide resolved
nixos/modules/services/audio/spotifyd.nix Outdated Show resolved Hide resolved
pkgs/applications/audio/spotifyd/default.nix Outdated Show resolved Hide resolved
nixos/modules/services/audio/spotifyd.nix Show resolved Hide resolved
@aanderse
Copy link
Member

@anderslundstedt LGTM 👍 Please squash all but the first commit into one and then from my perspective we're good to merge. Thanks!

@anderslundstedt
Copy link
Contributor Author

Great! Thanks everyone for the swift review. Should we not let the package and the module be introduced by separate commits? I kept it like that for now, but let me know if I should squash them together.

Copy link
Member

@aanderse aanderse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@flokli flokli merged commit 101a4be into NixOS:master Jul 23, 2019
@flokli
Copy link
Contributor

flokli commented Jul 23, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants