feat(multiService): Add service option to modify underlying process settings#617
Draft
shivaraj-bh wants to merge 7 commits intomainfrom
Draft
feat(multiService): Add service option to modify underlying process settings#617shivaraj-bh wants to merge 7 commits intomainfrom
shivaraj-bh wants to merge 7 commits intomainfrom
Conversation
settings.processes will interfere with existing settings option in a service. See mysql's options for ex.
shivaraj-bh
commented
Oct 31, 2025
| default = "${service}.${name}"; | ||
| type = lib.types.str; | ||
| processSettings = lib.mkOption { | ||
| type = lib.types.lazyAttrsOf lib.types.deferredModule; |
Member
Author
There was a problem hiding this comment.
lazyAttrsOf because a service can define multiple processes (postgres, postgres-init for example)
srid
reviewed
Oct 31, 2025
nix/lib.nix
Outdated
| imports = [ | ||
| config.outputs.defaultProcessSettings | ||
| cfg | ||
| ] ++ lib.optional (lib.hasAttr pName config.processSettings) config.processSettings.${pName}; |
Member
There was a problem hiding this comment.
This would silently fail on situations when the user sets settings for a non-existant process. So it is best to just discard the lib.hasAttr check here, because then evaluation fail when the user does that.
Member
|
Needs to update the documentation as well (LLM is handy here) https://community.flake.parts/services-flake/custom-service#multi-instance |
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.
resolves #616