Hi, On 15/01/16 11:55, Rok Garbas wrote:
> I can agree that evaluating for the second time is not optimal, I hope > there is a better way to do this, but I would really be against removing > the idea behind the feature. > > Usecases I'm solving with above solution are: - in one network servers > running with different nixpkgs - place nixpkgs checkout (via > fetchFromGitHub) inside nixos configuration, to make nixos configuration > reproducable by just checking out my nixos configuration > > Would you suggest different implementation to solve above problems? Yes, see https://github.com/NixOS/nixpkgs/commit/a5992ad61b314104aff7e28a41ce101a1b0e7c35#commitcomment-14987504. I.e. replacing configuration.nix with a Nix expression that fetches the desired Nixpkgs: import "${fetchTarball https://github.com/NixOS/nixpkgs/<hash>.tar.gz}/nixos" { configuration = { config, pkgs, ... }: { ... }; } This gets rid of the chicken-and-egg problem of having to evaluate the NixOS configuration to find out what Nixpkgs to use, since the Nixpkgs version is now no longer specified via the module system. Another possibility would be to build the module system into Nix, so module evaluation wouldn't depend on Nixpkgs. -- Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/ _______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
