zimbatm 1875344542
nixos-*: init as package
Move all the nixos-* scripts from the nixos distribution as real
packages in the pkgs/ package set.

This allows non-nixos users to run the script as well. For example,
deploying a remote machine with:

    nixos-rebuild --target-host root@hostname --build-host root@hostname
2018-10-16 11:12:36 +02:00

14 lines
281 B
Nix

{ substituteAll
, lib
, version ? lib.trivial.version
, codeName ? "unknown"
, revision ? lib.trivial.revisionWithDefault "master"
}:
substituteAll {
name = "nixos-version";
dir = "bin";
isExecutable = true;
src = ./nixos-version.sh;
inherit version codeName revision;
}