bug: Reference docs disagree with NixOS service settings on global port. #2431
Labels
No labels
Abandoned
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Compliance
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
bob the builder
No milestone
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
continuwuation/continuwuity#2431
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What is the bug?
https://continuwuity.org/reference/config.html
This suggests the port can be a single number.
https://search.nixos.org/options?channel=26.05&query=services.matrix-continuwuity.settings.global.port&type=options
On both
26.05andunstable, theportsetting must always be a list.Update the reference docs to match the service, or update the service to match the docs. Best is probably updating the NixOS settings to
types.either (listOf (port)) portand making it work as aport.Steps to reproduce
Server name and version
N/A
Additional context
No response
I don't know how nix packaging works, but the
portparam is a union type, it can either be a vec of u16s, or just a u16 outright (which is basically equivalent to a vec of them consisting of a single entry). I assume there may be an issue representing that type in the nix thingy or something?If it's a union type from where you see, there may be a validation issue:
Otherwise yes, it's a Nix something-something probably.
Yeah no idea what's going on there, but in the config definition it's definitely a union:
#[derive(Deserialize, Clone, Debug)]#[serde(transparent)]struct ListeningPort {#[serde(with = "either::serde_untagged")]ports: Either<u16, Vec<u16>>,}@Henry-Hiles I hate to cold mention but I recall you having contributed to the nix stuff before, would you happen to know what needs changing?
No worries, I don't mind mentions :)
This is more Bart's are than mine, as it's nixpkgs, not the flake, but I'd guess the type just needs changing in the module to use
types.either, like @tetraketra mentioned in the original post.C.C. @Bart