Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve generation inputs #3646

Open
copumpkin opened this issue Aug 17, 2014 · 9 comments
Open

Preserve generation inputs #3646

copumpkin opened this issue Aug 17, 2014 · 9 comments
Labels
0.kind: enhancement 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md

Comments

@copumpkin
Copy link
Member

When I do nixos-rebuild switch, it creates a new generation of the system, and lets me roll back to an old generation. That's great, but if I have a long list of generations, it would be really nice to be able to ask nix "what changed between generations 4 and 5?" and get a meaningful diff of the configuration.nix and its dependencies that fed into it.

I don't think configuration.nix is currently getting "snapshotted" with nixos-rebuild calls, and @edolstra says it could be pretty expensive to preserve all inputs, but perhaps there's a nice lightweight way that this general goal could be accomplished without too much pain? Leaving this ticket here for ideas/discussion.

@zimbatm
Copy link
Member

zimbatm commented Feb 18, 2016

Another use-case that's better explained by a story:

One time I was configuring a new machine and /etc/nixos/* would change quite a lot. At one point I rebooted and noticed that the X last generation wouldn't work. I found a derivation that worked but couldn't remember what had changed in /etc/nixos/* so I was stuck with a broken configuration.nix and wasn't able to restore the one from the working generation.

After that I started checking out every change into git but it would have been nice to have a backup. A derivation from /etc/nixos would probably be enough.

@magnetophon
Copy link
Member

nixos-scripts by @matthiasbeyer solves this partly, but I too feel this should be in NixOS.

@copumpkin
Copy link
Member Author

@fkz perhaps I should just push the current PR to completion? I like the sound of your less disruptive version of it but it'll probably be easier to finish the current one than rewrite it in a new way. Then we can iterate and do it more nicely later?

@copumpkin
Copy link
Member Author

This PR, for context: NixOS/nix#709

@Profpatsch
Copy link
Member

(triage) any progress?

@DerSaidin
Copy link

I want this feature too!

Looking around a bit, I guessed this would be implemented in one of the files touched by this commit, but I don't yet understand how this works well enough to get further.

@stale
Copy link

stale bot commented Jun 3, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2020
@DerSaidin
Copy link

Still important to me.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2020
@stale
Copy link

stale bot commented Nov 30, 2020

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: enhancement 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Projects
None yet
Development

No branches or pull requests

5 participants