[Nix-dev] Shape configuration.nix differently
Nicolas Pierron
nicolas.b.pierron at gmail.com
Fri May 29 01:55:34 CEST 2015
I am not sure to understand your
On Fri, May 29, 2015 at 1:39 AM, Manuel Pages
<amarr.industrial at gmail.com> wrote:
> Hey, I'm working on a differently-shaped /etc/nixos/configuration.nix.
>
> My vision is to shape it like this:
>
> ```
> { config, pkgs, ... }:
> pkgs.lib.fold (x: y: pkgs.lib.mergeAttrs x y) {} [
> import ./hardware-configuration.nix { pkgs = pkgs; config = config; }
> import ./boot/grub.nix { device = "/dev/sda"; }
> # ...
> ]
> ```
The problem that you see is that recent modifications of the module
system change pkgs to be the result of the configuration, instead of
being the one from your system.
This change as a side-effect of making pkgs.lib cause infinite recursions.
Then, I am not completely sure to understand what you want to achieve
which cannot be done with the module system?
--
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/
More information about the nix-dev
mailing list