Pierre-olivier Gendraud
Pierre-olivier Gendraud

Reputation: 1927

Is the package nixos-rebuild for a distribution different from nixos?

I've read the documentation for nix-rebuild. It look like it is only intended to use in nixos. The constant $NIX_PATH (/etc/nixos/configuration.nix) can be found only on a nixos distribution.. But in the package manager , there is a possibility to install the package a distribution different from nixos.

nix-env -iA nixpkgs.nixos-rebuild

Can this be useful for a non nix-os distribution?

Upvotes: 2

Views: 203

Answers (1)

nrbray
nrbray

Reputation: 183

To deploy NixOS on top of a different distribution the tools are different to nixos-rebuild.

If you are thinking of replacing your hosts OS with NixOS (instead of just Nix as say a package manager https://nixos.org/download.html#download-nix) then my suggestion is to look at one of three options:

  1. https://github.com/cleverca22/nix-tests/tree/master/kexec

  2. https://nixos.wiki/wiki/NixOS_Installation_Guide#Making_the_installation_media

  3. https://github.com/elitak/nixos-infect

Best regards Nigel

Upvotes: 0

Related Questions