Cursed refactor.

This commit is contained in:
kat witch 2021-03-05 00:36:51 +00:00
parent 20b4bafa85
commit 5845debc95
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
83 changed files with 1000 additions and 804 deletions

View file

@ -1,9 +1,9 @@
{ pkgs, hosts, profiles }:
{ pkgs, hosts, groups }:
with pkgs.lib;
(mapAttrs (name: hosts:
pkgs.writeScript "deploy-profile-${name}" ''
pkgs.writeScript "deploy-group-${name}" ''
#!${pkgs.runtimeShell}
export PATH=
${concatMapStrings (host: ''
@ -14,5 +14,5 @@ with pkgs.lib;
# FIXME: remove jobs from PIDLIST once they finish
trap "kill $PID_LIST" SIGINT
wait $PID_LIST
'') profiles)
'') groups)
// (mapAttrs (name: host: host.config.system.build.deployScript) hosts)