[Nix-dev] Gratuitous generations

phreedom at yandex.ru phreedom at yandex.ru
Tue Mar 31 14:02:34 CEST 2015


On Monday, March 30, 2015 16:16:36 Ryan Trinkle wrote:
> Ah, great point!  This line worked perfectly for me:
> 
> environment.etc."nixos/current/configuration.nix".text = builtins.readFile
> ./configuration.nix;

I have been using this option: system.copySystemConfiguration = true;

Placing the current config "closer" to /etc/nixos/configuration.nix makes it 
easier to run diff against the active profile. copySystemConfiguration's location 
makes it easier to dig older profiles. Maybe it's a good idea to use both 
locations?

> On Mon, Mar 30, 2015 at 4:10 PM, Michael Raskin <7c6f434c at mail.ru> wrote:
> > >On Mon, Mar 30, 2015 at 9:47 PM, Ryan Trinkle <ryan.trinkle at gmail.com>
> > 
> > wrote:
> > >> On a somewhat related note, is there any way to see the exact
> > >> configuration.nix for a particular generation?  It would be great to be
> > 
> > able
> > 
> > >> to diff generations against each other (e.g.: to figure out whether a
> > >> channel update caused a problem or whether it was my own change).
> > >
> > >You are not the first one to request this feature.
> > >They are a few issues in the way, but I will open an issue and do it
> > >as soon as I am done with the httpd rewrite.
> > 
> > In the meantime just adding /etc/ entry that is a copy of
> > /etc/nixos/configuration.nix should work…



More information about the nix-dev mailing list