!wfudwzqQUiJYJnqfSY:nixos.org

NixOS Module System

158 Members
30 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
8 Jul 2024
@aciceri:nixos.devaciceri
In reply to @nbp:mozilla.org
We do not have a way apart from disabledModules for replacing the default value for the documentation :/
That's not the end of world
12:41:53
@aciceri:nixos.devaciceri While I'm at it I've another question about the module system: why it isn't possible to set an option config.foo to a function of config.foo? 12:44:57
@aciceri:nixos.devaciceriIn general it shouldn't lead to an infinite recursion12:45:23
@aciceri:nixos.devaciceri Or maybe yes, I'm not sure anymore...I remember thinking about this time ago. The example I was giving to myself was something like foo = f config.foo where f is the usual recursive factorial. But thinking about it now I can't see how I could express the recursion base case. 12:48:22
@aciceri:nixos.devaciceri But still I believe that even foo = g config.foo with g: _: 42 as the constant function would lead to an infinite recursion error (perhaps I'm wrong, haven't tried) 12:49:16
@aciceri:nixos.devaciceri * But still I believe that even foo = g config.foo with g = _: 42 as the constant function would lead to an infinite recursion error (perhaps I'm wrong, haven't tried) 12:50:03
@nbp:mozilla.orgnbp You are interested in making a fix-point within the module system. I never thought of it before.
It is possible to make a fix-point within the apply function of an option, which how submodules are implemented, but using the option it-self …
I doubt g = _: 42 would yield to an infinite recursion as config.foo would be evaluated lazify if the argument is used.
12:59:48

Show newer messages


Back to Room ListRoom Version: 10