disko/disko-install.nix
Jörg Thalheim bde7dd352c add disko-install command
disko-install combines disko and nixos-install into a single command.

Example usage:

  sudo ./disko-install --flake /someflake#eva --disk sda /dev/zvol/zroot/test
2024-03-01 09:48:08 +00:00

26 lines
761 B
Nix

{ stdenvNoCC, makeWrapper, lib }:
stdenvNoCC.mkDerivation {
name = "disko-install";
src = ./.;
nativeBuildInputs = [
makeWrapper
];
installPhase = ''
mkdir -p $out/bin $out/share/disko
cp -r install-cli.nix $out/share/disko
sed \
-e "s|libexec_dir=\".*\"|libexec_dir=\"$out/share/disko\"|" \
-e "s|#!/usr/bin/env.*|#!/usr/bin/env bash|" \
disko-install > $out/bin/disko-install
chmod 755 $out/bin/disko-install
wrapProgram $out/bin/disko-install
'';
meta = with lib; {
description = "Disko and nixos-install in one command";
homepage = "https://github.com/nix-community/disko";
license = licenses.mit;
maintainers = with maintainers; [ lassulus ];
platforms = platforms.linux;
};
}