Skip to content

Conversation

@shivaraj-bh
Copy link
Member

resolves #616

settings.processes will interfere with existing settings option in a
service.

See mysql's options for ex.
default = "${service}.${name}";
type = lib.types.str;
processSettings = lib.mkOption {
type = lib.types.lazyAttrsOf lib.types.deferredModule;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lazyAttrsOf because a service can define multiple processes (postgres, postgres-init for example)

nix/lib.nix Outdated
imports = [
config.outputs.defaultProcessSettings
cfg
] ++ lib.optional (lib.hasAttr pName config.processSettings) config.processSettings.${pName};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@srid
Copy link
Member

srid commented Oct 31, 2025

Needs to update the documentation as well (LLM is handy here)

https://community.flake.parts/services-flake/custom-service#multi-instance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

multiService: Add depends_on as a default option

3 participants