!wfudwzqQUiJYJnqfSY:nixos.org

NixOS Module System

153 Members
29 Servers

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


SenderMessageTime
20 May 2025
@kongrooparadox:matrix.orgkongrooparadox joined the room.21:44:52
21 May 2025
@oddlama:matrix.orgoddlama changed their display name from Malte to oddlama.17:42:04
@ss:someonex.netSomeoneSerge (back on matrix) I see that nixos/lib and nixos/modules use normal path values in _file (except for modulesPath = toString ./eval-config.nix), but somehow in man configuration.nix we get relative paths without hashes? How does that happen 17:48:12
@mattsturg:matrix.orgMatt Sturgeon

path values only get copied to the store when used with string interpolation (e.g. "${./some/path}"). If you instead stringify them with toString, then they are not copied.

E.g.

"${./foo}"
=> "/nix/store/r1l6z113nnzx44iiqp728f50lpczp577-foo"

toString ./foo
=> "/home/matt/foo"

./foo
=> /home/matt/foo
17:53:58
@ss:someonex.netSomeoneSerge (back on matrix) Ohhh so nixos/modules actually does pass strings around and not paths? 18:00:37
@ss:someonex.netSomeoneSerge (back on matrix)
nixos/lib/eval-config.nix
71-  pkgsModule = rec {
72:    _file = ./eval-config.nix;
73:    key = _file;
18:02:08

Show newer messages


Back to Room ListRoom Version: 10