summaryrefslogtreecommitdiff
path: root/Biz
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-12-06 13:51:19 -0500
committerBen Sima <ben@bsima.me>2020-12-06 13:51:19 -0500
commit183d16c1793c14769881536dcd0bb5f9a9f760ce (patch)
treea40983c5d955fea99279b0801118dd5c534ad5c8 /Biz
parentff59d7817fa8dc7dd8e81bb65db09d6d22f632c6 (diff)
Don't try to do remote builds when on lithium
Diffstat (limited to 'Biz')
-rw-r--r--Biz/Bild.hs18
1 files changed, 11 insertions, 7 deletions
diff --git a/Biz/Bild.hs b/Biz/Bild.hs
index f3c68e4..c1cd24f 100644
--- a/Biz/Bild.hs
+++ b/Biz/Bild.hs
@@ -184,6 +184,7 @@ analyze :: String -> IO Target
analyze s = do
user <- Env.getEnv "USER"
root <- Env.getEnv "BIZ_ROOT"
+ host <- chomp </ readFile "/etc/hostname"
cwd <- Dir.getCurrentDirectory
let path = cwd </> s
namespace =
@@ -210,13 +211,16 @@ analyze s = do
compiler = NixBuild,
out = "",
builder =
- join
- [ "ssh://",
- user,
- "@dev.simatime.com?ssh-key=/home/",
- user,
- "/.ssh/id_rsa"
- ],
+ if host == "lithium"
+ then user <> "@localhost"
+ else
+ join
+ [ "ssh://",
+ user,
+ "@dev.simatime.com?ssh-key=/home/",
+ user,
+ "/.ssh/id_rsa"
+ ],
..
}
".scm" ->