Re: [Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-10 Thread Vince
That's pretty neat! On 10-04-17 22:04, Layus wrote: On 10/04/17 19:41, Vince wrote: Benjamin Herr schreef op 10 april 2017 19:17:44 CEST: I've been putting environment.etc = { nixos-orig.source = ./.; }; into my configuration.nix and

Re: [Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-10 Thread Ryan Trinkle
Yep, I'm adopting that, too! On Mon, Apr 10, 2017 at 4:04 PM, Layus wrote: > On 10/04/17 19:41, Vince wrote: > > Benjamin Herr schreef op 10 april 2017 > 19:17:44 CEST: >> >> I've been putting >> >> environment.etc = { >>

Re: [Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-10 Thread Layus
On 10/04/17 19:41, Vince wrote: Benjamin Herr schreef op 10 april 2017 19:17:44 CEST: I've been putting environment.etc = { nixos-orig.source = ./.; }; into my configuration.nix and for my still fairly trivial but at least somewhat

Re: [Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-10 Thread Layus
This is pure genious ! Simple and yet powerful. Thanks for sharing :-). It can be customized with filterSource and such if you want more control. However, it does not track modifications to nixpkgs. I have a bad habit of building NixOS from dirty nixpkgs repos to test my various fixes. Any

Re: [Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-10 Thread Vince
Benjamin Herr schreef op 10 april 2017 19:17:44 CEST: >I've been putting > >    environment.etc = { >        nixos-orig.source = ./.; >    }; > >into my configuration.nix and for my still fairly trivial but at least >somewhat moduralized config it seems to work out all right. > >

Re: [Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-10 Thread Benjamin Herr
I've been putting     environment.etc = {         nixos-orig.source = ./.;     }; into my configuration.nix and for my still fairly trivial but at least somewhat moduralized config it seems to work out all right. On Thu, 2017-04-06 at 18:12 +0200, Guillaume Maudoux (Layus) wrote: > Hi, > >

Re: [Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-10 Thread zimbatm
This issue is likely to trip most newcomers. Maybe nixos-install should create a git repo in /etc/nixos by default. And then "nixos build" automatically commit on invocation. On Mon, 10 Apr 2017, 04:41 Ryan Trinkle, wrote: > Jeaye, > > I totally agree! One really

Re: [Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-09 Thread Ryan Trinkle
Jeaye, I totally agree! One really interesting approach to this that I've seen is the 'pass' password manager, which can automatically handle the use of git for passwords. I wonder if it would be feasible to do this for nixos as well, so that beginners (who might not be familiar with git) would

Re: [Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-09 Thread Jeaye
On Thu, Apr 06, 2017 at 04:12:03PM +0200, ni...@vince.lol wrote: > Hi all, > > I acidentally removed my /etc/nixos/configuration.nix is there any way I can > get it back? > > Sincerely, > Vince I know you've sorted this out now, but I think it's worthwhile to mention that one of the benefits

Re: [Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-09 Thread Layus
Yes, it's a fantastic idea that, like too many others, has a working implementation bitrotting in a PR. But I have an idea to end this ;-). Coming soon :-D. G. On 06/04/17 20:54, Ryan Trinkle wrote: Layus, That does sound fantastic! Do you think that PR has a reasonable chance of landing

Re: [Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-06 Thread Ryan Trinkle
Layus, That does sound fantastic! Do you think that PR has a reasonable chance of landing in the near future? Ryan On Thu, Apr 6, 2017 at 12:12 PM, Guillaume Maudoux (Layus) < layus...@gmail.com> wrote: > Hi, > > system.copySystemConfiguration is far from perfect. As soon as you > modularize

Re: [Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-06 Thread Guillaume Maudoux (Layus)
Hi, system.copySystemConfiguration is far from perfect. As soon as you modularize your config, you will miss all the other files. If you want a correct system.copySystemConfiguration, you really need https://github.com/NixOS/nix/pull/709. It allows you to snapshot all the sources of a nix

Re: [Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-06 Thread Alexey Shmalko
ni...@vince.lol writes: > Hi all, > > I acidentally removed my /etc/nixos/configuration.nix is there any way I can > get it back? If you have enabled system.copySystemConfiguration option, you can find your config at /var/run/current-system/configuration.nix Though, the option is disabled by

Re: [Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-06 Thread Ryan Trinkle
Hi Vince, I do happen to know why it's set to false by default! I sent a PR to change it to true a while back, and got some good explanations for why that's a bad idea here: https://github.com/NixOS/nixpkgs/pull/16922 However, I'm now wondering if it might make sense to add

Re: [Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-06 Thread Sergiu Ivanov
Thus quoth ni...@vince.lol at 15:46 on Thu, Apr 06 2017: > > Does anyone know why `system.copySystemConfiguration` is set to false > by default? It seems like it would be better to default this to true, > right? I had the same question floating around my brain. > Anyway, I'll be okay, thanks

Re: [Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-06 Thread nixos
No I don't have `system.copySystemConfiguration=true` set :-( Luckily I documented my recent efforts in some gists. I managed to install NixOS on ZFS here: https://gist.github.com/awesomefireduck/c763e168a62a0ef559a1fb9473261459 And my (yet untested) attempt at PCI passthrough here:

Re: [Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-06 Thread Sergiu Ivanov
Hi Vince, Thus quoth ni...@vince.lol at 14:12 on Thu, Apr 06 2017: > > I acidentally removed my /etc/nixos/configuration.nix is there any way > I can get it back? Citing directly from: http://stackoverflow.com/questions/28603773/recover-accidentally-deleted-configuration-nix-file '''

Re: [Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-06 Thread Tomasz Czyż
As it's read by nix, I assume it would be somewhere in nix store, but I did quick look and didn't find (but might be there, nexted somewhere) 2017-04-06 15:12 GMT+01:00 : > Hi all, > > I acidentally removed my /etc/nixos/configuration.nix is there any way I > can get it back? >

[Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-06 Thread nixos
Hi all, I acidentally removed my /etc/nixos/configuration.nix is there any way I can get it back? Sincerely, Vince ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev