Skip to content

nsq: 0.3.5 -> 1.1.0, add nixos/nsq#57913

Closed
pjones wants to merge 1 commit intoNixOS:masterfrom
pjones:pjones/nsq-master
Closed

nsq: 0.3.5 -> 1.1.0, add nixos/nsq#57913
pjones wants to merge 1 commit intoNixOS:masterfrom
pjones:pjones/nsq-master

Conversation

@pjones
Copy link
Copy Markdown
Contributor

@pjones pjones commented Mar 19, 2019

Motivation for this change

Upgrade nsq to the latest release and create a NixOS module for it.

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.

@pjones pjones requested a review from infinisil as a code owner March 19, 2019 19:15
@GrahamcOfBorg GrahamcOfBorg added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Mar 19, 2019
@infinisil
Copy link
Copy Markdown
Member

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 (recursiveUpdate doesn't merge correctly).

rss2email = 312;
cockroachdb = 313;
zoneminder = 314;
nsq = 315;
Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member

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";
Copy link
Copy Markdown
Member

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;
Copy link
Copy Markdown
Member

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.

@infinisil infinisil added the 8.has: package (update) This PR updates a package to a newer version label Mar 30, 2019
@pjones
Copy link
Copy Markdown
Contributor Author

pjones commented Apr 18, 2019

Turns out that I'm not going to need NSQ in NixOS right now. I'll revisit this in the future.

@pjones pjones closed this Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (update) This PR updates a package to a newer version 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants