Compare commits

..

2 commits

Author SHA1 Message Date
f17c9fde3f
split outputs 2024-10-30 22:21:52 -05:00
42933ae97c
strip output 2024-10-30 21:26:41 -05:00

View file

@ -16,7 +16,7 @@ proc nixCommand(cmd: string): string =
proc nixosConfigAttrs*(): seq[string] =
for host in getHosts():
result.add fmt"{getFlake()}#nixosConfigurations.{host}.config.system.build.toplevel"
result.add getFlake() & "#nixosConfigurations." & host & ".config.system.build.toplevel"
const nixosSubcmds* =
"""switch boot test build dry-build dry-activate edit
@ -254,10 +254,11 @@ proc nixBuildWithCache*(name: string, rest:seq[string], service: string, jobs: i
cmd.addArgs rest
let (path, _, buildCode) = runCmdCapt(cmd)
if buildCode != 0:
# TODO: propagate errors using nix log?
error "failed to build: " & drv
continue
outs.add path
# TODO: propagate errors using nix log?
outs &= path.strip().splitLines()
var cmd = service
cmd.addArg "push"