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
roon-server: init 100500363 #51308
Conversation
c30255b
to
516ba24
Compare
Is there something I should be doing to fix the errors with this build? |
a126a09
to
c8e926a
Compare
c8e926a
to
ed65077
Compare
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}\""; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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}"; |
There was a problem hiding this comment.
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}"; |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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 ]; |
There was a problem hiding this comment.
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
Closing in favour of #63551 |
Motivation for this change
I use this to organise and listen to my music.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)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.