Skip to content

nix profiles are hard to reproduce #7965

@bobvanderlinden

Description

@bobvanderlinden

The main selling point of Nix is reproducibility. However, since nix profile doesn't expose its manifest.json it is far from trivial to reproduce the same profile on a different system. manifest.json seems like a good candidate to be used in nix shell, home-manager and NixOS. This gives the best of both worlds: imperative CLI, declarative and shareable configuration. For example, something like this would be nice to have:

$ nix profile install nixpkgs#cowsay
$ nix profile export manifest.json
# On another system:
$ nix profile import manifest.json
# Or:
$ nix shell --manifest manifest.json
# Or in home-manager:
{
  home.profiles.main = lib.importManifest ./manifest.json;
}

This is similar to what Guix is already doing: https://guix.gnu.org/manual/devel/en/html_node/Writing-Manifests.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeature request or proposalnew-cliRelating to the "nix" command

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions