| 20 May 2025 |
| kongrooparadox joined the room. | 21:44:52 |
| 21 May 2025 |
| oddlama changed their display name from Malte to oddlama. | 17:42:04 |
SomeoneSerge (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 |
Matt 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 |
SomeoneSerge (back on matrix) | Ohhh so nixos/modules actually does pass strings around and not paths? | 18:00:37 |
SomeoneSerge (back on matrix) | nixos/lib/eval-config.nix
71- pkgsModule = rec {
72: _file = ./eval-config.nix;
73: key = _file;
| 18:02:08 |