l krops: use nom for build
This commit is contained in:
parent
500aa05de7
commit
4ef26cd0f6
@ -37,18 +37,22 @@
|
|||||||
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
deploy = { target ? "root@${name}/var/src" }: pkgs.krops.writeCommand "deploy" {
|
deploy = { target ? "root@${name}/var/src", offline ? false }: pkgs.krops.writeCommand "deploy" {
|
||||||
command = targetPath: ''
|
command = targetPath: ''
|
||||||
|
|
||||||
set -fu
|
set -xfu
|
||||||
|
|
||||||
outDir=$(mktemp -d)
|
outDir=$(mktemp -d)
|
||||||
trap "rm -rf $outDir;" INT TERM EXIT
|
trap "rm -rf $outDir;" INT TERM EXIT
|
||||||
|
|
||||||
nix build \
|
build=$(command -v nom-build || echo "nix-build")
|
||||||
|
|
||||||
|
$build \
|
||||||
-I "${targetPath}" \
|
-I "${targetPath}" \
|
||||||
-f '<nixpkgs/nixos>' config.system.build.toplevel \
|
'<nixpkgs/nixos>' -A config.system.build.toplevel \
|
||||||
-o "$outDir/out"
|
-o "$outDir/out" \
|
||||||
|
${lib.optionalString offline "--option substitute false"} \
|
||||||
|
# -vvvvv --show-trace
|
||||||
|
|
||||||
nix-env -p /nix/var/nix/profiles/system --set "$outDir/out"
|
nix-env -p /nix/var/nix/profiles/system --set "$outDir/out"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user