move nixos-rebuild into pkgs

This commit is contained in:
Domen Kožar 2021-01-15 20:03:07 +01:00
parent 7996fb0d4e
commit c32f5b22f1
No known key found for this signature in database
GPG key ID: C2FFBCAFD2C24246
4 changed files with 17 additions and 11 deletions

View file

@ -28,17 +28,7 @@ let
];
};
nixos-rebuild =
let fallback = import ./nix-fallback-paths.nix; in
makeProg {
name = "nixos-rebuild";
src = ./nixos-rebuild.sh;
inherit (pkgs) runtimeShell;
nix = config.nix.package.out;
nix_x86_64_linux = fallback.x86_64-linux;
nix_i686_linux = fallback.i686-linux;
path = makeBinPath [ pkgs.jq ];
};
nixos-rebuild = pkgs.nixos-rebuild.override { nix = config.nix.package.out; };
nixos-generate-config = makeProg {
name = "nixos-generate-config";

View file

@ -0,0 +1,14 @@
{ substituteAll, runtimeShell, jq, nix, lib }:
let
fallback = import ./../../../../nixos/modules/installer/tools/nix-fallback-paths.nix;
in substituteAll {
name = "nixos-rebuild";
src = ./nixos-rebuild.sh;
dir = "bin";
isExecutable = true;
inherit runtimeShell nix;
nix_x86_64_linux = fallback.x86_64-linux;
nix_i686_linux = fallback.i686-linux;
path = lib.makeBinPath [ jq ];
}

View file

@ -28913,6 +28913,8 @@ in
nixos-generators = callPackage ../tools/nix/nixos-generators { };
nixos-rebuild = callPackage ../os-specific/linux/nixos-rebuild { };
norwester-font = callPackage ../data/fonts/norwester {};
nut = callPackage ../applications/misc/nut { };