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

roon-server: init 100500363 #51308

Closed
wants to merge 1 commit into from
Closed

Conversation

lovek323
Copy link
Member

@lovek323 lovek323 commented Dec 1, 2018

Motivation for this change

I use this to organise and listen to my music.

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 nox --run "nox-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

I haven't played with modules much, so I'd appreciate any suggestions/feedback on how this could improve. There is one thing I need specific help with - I'll add a comment inline.

@lovek323
Copy link
Member Author

lovek323 commented Dec 1, 2018

Is there something I should be doing to fix the errors with this build?

@lovek323 lovek323 force-pushed the roon-server branch 2 times, most recently from a126a09 to c8e926a Compare December 4, 2018 21:14
@reanimus
Copy link
Contributor

I'd also be interested in seeing this merged, as I'd love to move my media server to NixOS :)

wantedBy = [ "multi-user.target" ];

serviceConfig = {
Environment = "\"ROON_DATAROOT=${cfg.dataDir}\"";
Copy link
Member

Choose a reason for hiding this comment

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

Use systemd.services.roon-server.environment.ROON_DATAROOT = cfg.dataDir; instead

@@ -338,6 +338,7 @@
minetest = 311;
rss2email = 312;
cockroachdb = 313;
roon-server = 314;
Copy link
Member

Choose a reason for hiding this comment

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

No need to allocate a static uid,gid

serviceConfig = {
Environment = "\"ROON_DATAROOT=${cfg.dataDir}\"";
ExecStart = "${pkgs.bash}/bin/bash ${pkgs.roon-server}/opt/start.sh";
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p ${cfg.dataDir} && chown ${cfg.user}:${cfg.group} ${cfg.dataDir}";
Copy link
Member

Choose a reason for hiding this comment

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

Use systemd.tmpfiles instead

ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p ${cfg.dataDir} && chown ${cfg.user}:${cfg.group} ${cfg.dataDir}";
LimitNOFILE = 8192;
PermissionsStartOnly = true;
User = "${cfg.user}";
Copy link
Member

Choose a reason for hiding this comment

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

Just User = cfg.user; works. And you should also set Group =


serviceConfig = {
Environment = "\"ROON_DATAROOT=${cfg.dataDir}\"";
ExecStart = "${pkgs.bash}/bin/bash ${pkgs.roon-server}/opt/start.sh";
Copy link
Member

Choose a reason for hiding this comment

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

Why not call the script directly?

sha256 = "1pdlglhmsm0l4k6g4l97ckw596ckw8nnxii60j1xg994kdiikz3s";
};

propagatedBuildInputs = [ alsaLib alsaUtils cifs_utils ffmpeg libav mono ];
Copy link
Member

Choose a reason for hiding this comment

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

Pretty sure you can just remove this line

@Steell Steell mentioned this pull request Jun 20, 2019
10 tasks
@peterhoeg
Copy link
Member

Closing in favour of #63551

@peterhoeg peterhoeg closed this Jun 25, 2019
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