nixos-install: move to pkgs/by-name

This commit is contained in:
K900 2024-09-19 20:09:50 +03:00
parent 825f6ffa9e
commit 51b47621ac
4 changed files with 34 additions and 13 deletions

View File

@ -19,19 +19,7 @@ let
inherit (pkgs) nixos-build-vms;
nixos-install = makeProg {
name = "nixos-install";
src = ./nixos-install.sh;
inherit (pkgs) runtimeShell;
nix = config.nix.package.out;
path = makeBinPath [
pkgs.jq
nixos-enter
pkgs.util-linuxMinimal
];
manPage = ./manpages/nixos-install.8;
};
nixos-install = pkgs.nixos-install.override { nix = config.nix.package; };
nixos-rebuild = pkgs.nixos-rebuild.override { nix = config.nix.package.out; };
nixos-generate-config = makeProg {

View File

@ -0,0 +1,33 @@
{
lib,
substituteAll,
runtimeShell,
installShellFiles,
nix,
jq,
nixos-enter,
util-linuxMinimal,
}:
substituteAll {
name = "nixos-install";
src = ./nixos-install.sh;
inherit runtimeShell nix;
path = lib.makeBinPath [
jq
nixos-enter
util-linuxMinimal
];
dir = "bin";
isExecutable = true;
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installManPage ${./nixos-install.8}
'';
meta.mainProgram = "nixos-install";
}