!wfudwzqQUiJYJnqfSY:nixos.org

NixOS Module System

150 Members
28 Servers

Load older messages


SenderMessageTime
18 Jan 2026
@isabel:isabelroses.comisabel changed their profile picture.20:43:36
19 Jan 2026
@mpuppe:matrix.orgmpuppe joined the room.21:20:37
21 Jan 2026
@bake.monorail:matrix.orgbake.monorail is there anything more specific than types.str I can use for a version number that I will later compare with lib.versionAtLeast? 20:39:57
@mattsturg:matrix.orgMatt Sturgeon

In string types we have strMatching, however that expects a regex not a predicate function.

The general solution is addCheck (see extending types), however the examples there don't show that you typically also want to extend/override the type's description.

20:46:28
@bake.monorail:matrix.orgbake.monorail yeah, I went with strMatching, but I was hoping to have a type matching exactly what versionAtLeast would accept, but I guess there's no such a thing 20:50:21
@bake.monorail:matrix.orgbake.monorail versionAtLeast under the hood uses builtins.compareVersions, which seems to accept anything, probably it has a last-resort method comparison that's just lexicographic comparison 20:53:24
22 Jan 2026
@nbp:mozilla.orgnbpI would say, at the very least types are part of the documentation, if you can give a more descriptive name even if there is no additional check, this might be worth it. (i-e. just aliasing the name my motivate someone else to add a check function later)11:28:54
28 Jan 2026
@alexandrutocar:matrix.org- changed their display name from Alexandru Tocar to -.18:34:44

There are no newer messages yet.


Back to Room ListRoom Version: 10