diff options
author | tv <tv@krebsco.de> | 2022-06-28 22:45:06 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2022-06-28 22:45:06 +0200 |
commit | 87ca8682cee6cbc9230971c17590481a95a21f45 (patch) | |
tree | aba322986cc297b904b64adc80f93a1c1fbddcc0 /lass/krops.nix | |
parent | bce11dce189b4132d7a2f19f473590dea7508e85 (diff) | |
parent | 64dbf31d70497d6a66f89fdd86ac1884e28f7bc8 (diff) |
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'lass/krops.nix')
-rw-r--r-- | lass/krops.nix | 14 |
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" |