From d1a55f88766b72769e5f756f8b4724e13e1c6981 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 23 Oct 2021 19:03:02 +0200 Subject: l coaxmetal.r: build with unstable --- lass/krops.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass/krops.nix') diff --git a/lass/krops.nix b/lass/krops.nix index 128c9ee0..fe5c00f3 100644 --- a/lass/krops.nix +++ b/lass/krops.nix @@ -24,7 +24,7 @@ }; }; } - (if (lib.pathExists (./. + "/1systems/${name}/source.nix")) && (! test) then + (if lib.pathExists (./. + "/1systems/${name}/source.nix") then import (./. + "/1systems/${name}/source.nix") { inherit lib pkgs test; } else {} -- cgit v1.2.3 From fdbfd2d4eca520ddee23fe76c702a4d38021d00b Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 26 Oct 2021 21:00:22 +0200 Subject: l krops: use fancy deploy --- lass/krops.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'lass/krops.nix') diff --git a/lass/krops.nix b/lass/krops.nix index fe5c00f3..76911270 100644 --- a/lass/krops.nix +++ b/lass/krops.nix @@ -33,9 +33,23 @@ in { - # usage: $(nix-build --no-out-link --argstr name HOSTNAME -A deploy) - deploy = { target ? "root@${name}/var/src" }: pkgs.krops.writeDeploy "${name}-deploy" { + deploy = { target ? "root@${name}/var/src" }: pkgs.krops.writeCommand "deploy" { + command = targetPath: '' + + set -fu + + outDir=$(mktemp -d) + trap "rm -rf $outDir;" INT TERM EXIT + + nix build \ + -I "${targetPath}" \ + -f '' config.system.build.toplevel \ + -o "$outDir/out" + + $outDir/out/bin/switch-to-configuration switch + ''; source = source { test = false; }; + allocateTTY = true; inherit target; }; -- cgit v1.2.3