
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
17 lines
341 B
Nix
17 lines
341 B
Nix
{ substituteAll
|
|
, btrfs-progs
|
|
, perl
|
|
, perlPackages
|
|
, lib
|
|
, release ? lib.trivial.release
|
|
}:
|
|
substituteAll {
|
|
name = "nixos-generate-config";
|
|
dir = "bin";
|
|
isExecutable = true;
|
|
src = ./nixos-generate-config.pl;
|
|
path = [ btrfs-progs ];
|
|
perl = "${perl}/bin/perl -I${perlPackages.FileSlurp}/lib/perl5/site_perl";
|
|
inherit release;
|
|
}
|