Draft
Conversation
Nixpkgs go stuff complained about the nested module in nix/nixos/test/socket-server, which is not a problem for go build.
zimbatm
reviewed
Apr 15, 2022
nix/nixos/socketmaster-service.nix
Outdated
| # Avoid automatic restarts. This will trigger a reload instead. | ||
| reloadIfChanged = true; | ||
| serviceConfig.ExecStart = [ | ||
| "${systemConfig.socketmaster.package}/bin/socketmaster -command ${lib.escapeShellArg config.command} -start ${toString config.startMillis} -listen fd://3" |
Owner
There was a problem hiding this comment.
Suggested change
| "${systemConfig.socketmaster.package}/bin/socketmaster -command ${lib.escapeShellArg config.command} -start ${toString config.startMillis} -listen fd://3" | |
| "${systemConfig.socketmaster.package}/bin/socketmaster -command /run/socketmaster/${config.name} -start ${toString config.startMillis} -listen fd://3" |
If I'm not mistaken the command needs to point to a mutable location so that on reload, it would load the new command.
As an aside, the command script might also include a bunch of env vars.
Author
There was a problem hiding this comment.
I figured this could be covered by an entry in a config file instead. Not dissimilar to a systemd unit file, but far more limited, because we can't change many of those fancy settings like security or mounts related ones once the systemd service is running.
zimbatm
reviewed
Jun 3, 2022
| systemAttrs = eachDefaultSystem perSystem; | ||
|
|
||
| in | ||
| systemAttrs // flakeAttrs; |
Owner
There was a problem hiding this comment.
This reminds me of flake-parts :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goals:
HUP