-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
nsq: 0.3.5 -> 1.1.0, add nixos/nsq #57913
Conversation
Take a look at NixOS/rfcs#42. With the approach described there, the implementation of this will be simplified and also get correct merging behavior ( |
@@ -339,6 +339,7 @@ | |||
rss2email = 312; | |||
cockroachdb = 313; | |||
zoneminder = 314; | |||
nsq = 315; |
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.
I guess we can avoid allocating a user, by using the DynamicUser
feature of systemd.
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.
And if DynamicUser
doesn't work, just a normal user without a static uid will work too
# Configuration for nsqd as a Nix attrset: | ||
nsqdConfig = recursiveUpdate { | ||
mem_queue_size = cfg.nsqd.queueSize; | ||
data_path = "${cfg.dataDir}/nsqd"; |
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.
This would be /var/lib/nsqd
.
wantedBy = [ "multi-user.target" ]; | ||
serviceConfig.User = cfg.user; | ||
serviceConfig.Group = cfg.group; | ||
serviceConfig.PermissionsStartOnly = true; |
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.
we can drop this, and let systemd handle creation of the state directory.
Turns out that I'm not going to need NSQ in NixOS right now. I'll revisit this in the future. |
Motivation for this change
Upgrade nsq to the latest release and create a NixOS module for it.
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)