summaryrefslogtreecommitdiffstats
path: root/lass/krops.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-06-21 23:39:33 +0200
committerlassulus <lassulus@lassul.us>2022-06-21 23:39:33 +0200
commit4ef26cd0f67d77dbb1a35b5b43ed2272c17e64b8 (patch)
tree876a9aab93fbfc3a1a9fe3b66003b1dfc5685563 /lass/krops.nix
parent500aa05de7e34f6a60639a74017583268f9a829d (diff)
l krops: use nom for build
Diffstat (limited to 'lass/krops.nix')
-rw-r--r--lass/krops.nix14
1 files changed, 9 insertions, 5 deletions
diff --git a/lass/krops.nix b/lass/krops.nix
index ace37888f..c8a5b94b7 100644
--- a/lass/krops.nix
+++ b/lass/krops.nix
@@ -37,18 +37,22 @@
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: ''
- set -fu
+ set -xfu
outDir=$(mktemp -d)
trap "rm -rf $outDir;" INT TERM EXIT
- nix build \
+ build=$(command -v nom-build || echo "nix-build")
+
+ $build \
-I "${targetPath}" \
- -f '<nixpkgs/nixos>' config.system.build.toplevel \
- -o "$outDir/out"
+ '<nixpkgs/nixos>' -A config.system.build.toplevel \
+ -o "$outDir/out" \
+ ${lib.optionalString offline "--option substitute false"} \
+ # -vvvvv --show-trace
nix-env -p /nix/var/nix/profiles/system --set "$outDir/out"