!wfudwzqQUiJYJnqfSY:nixos.org

NixOS Module System

143 Members
28 Servers

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


SenderMessageTime
1 Jun 2025
@bew:matrix.orgbewI see, thanks a lot for the answer! In the end I went with a custom option to store some state about the current eval, which allows me to directly be able to access highestPrio on those options 👍10:11:25
@bew:matrix.orgbew* I see, thanks a lot for the answer! In the end I went with a custom options to store some state about the current eval, which allows me to directly be able to access highestPrio on those options 👍10:11:35
@mattsturg:matrix.orgMatt Sturgeon

Awesome. That sounds more idiomatic!

Just a general design titbit: extendModules is more efficient when you don't read anything from the extended configuration.

Due to laziness, extended module evals don't actually need to be fully evaluated, so if you only read from the "final" extended configuration, then you don't need to also spend time evaluating the other ones.

10:18:21
@bew:matrix.orgbew* I see, thanks a lot for the answer! In the end I'm going with a custom options to store some state about the current eval, which allows me to directly be able to access highestPrio on those options 👍11:39:28
@seanthw:matrix.orgSean Thawe joined the room.23:48:32
2 Jun 2025
@bew:matrix.orgbew

Yes, I'm quite happy with what I managed to do ✨
Basically I made a system where I can easily eval an initial config, then call theconfig.lib.extendWith somemodule that returns a new config with the somemodule applied on top.
This module can access the previous config if it needs it, and the extendWith can be done on any config 'instance' ❤️
https://github.com/bew/dotfiles/blob/main/nix/kit-system/tests.nix if you want to take a look

I use this in my dotfiles to make mini module systems to configure nvim/zsh/tmux, and incrementally enable various flags for different flake outputs..

00:33:01
@bew:matrix.orgbew *

Yes, I'm quite happy with what I managed to do ✨
Basically I made a system where I can easily eval an initial config, then call theconfig.lib.extendWith somemodule that returns a new config with the somemodule applied on top.
This module can access the previous config if it needs it, and the extendWith can be done on any config 'instance' ❤️
https://github.com/bew/dotfiles/blob/main/nix/kit-system/tests.nix if you want to take a look

I use this in my dotfiles to make small independent module systems to configure nvim/zsh/tmux, and incrementally enable various flags for different flake outputs..

00:34:14
4 Jun 2025
@rob.sliwi:matrix.orgrobsliwi changed their display name from Robert Sliwinski to robsliwi.18:30:25
6 Jun 2025
@creepinson:matrix.org@creepinson:matrix.org left the room.00:18:42
@sportshead:matrix.orgsportshead joined the room.18:45:00
7 Jun 2025
@deeok:matrix.orgmatrixrooms.info mod bot (does NOT read/send messages and/or invites; used for checking reported rooms) left the room.22:32:07
@deeok:matrix.orgmatrixrooms.info mod bot (does NOT read/send messages and/or invites; used for checking reported rooms) joined the room.23:25:32

Show newer messages


Back to Room ListRoom Version: 10