[Nix-dev] Resolution context of `require' paths

Ludovic Courtès ludo at gnu.org
Tue Jun 30 09:50:26 CEST 2009


Hello,

The `modular-nixos' branch introduces `require' statements, which now
take a path, e.g.,

  require = [ ./nixos/hardware/network/intel-4965agn.nix ];

The problem is that the resolution context of this relative path is
often problematic.

With the installation, this path is resolved relative to the
installation target root (/mnt) whereas `nixos-checkout' stores the
NixOS source under /.

Similarly, with /etc/nixos/configuration.nix being a symlink to
$HOME/src/..., that path is resolved relative to the actual location of
`configuration.nix', not relative to /etc/nixos.

I find this behavior inconvenient.  Do you have ideas on how to fix it?

Thanks,
Ludo'.




More information about the nix-dev mailing list