diff --git a/lib/deploy.nix b/lib/deploy.nix index decce55f..91e9693b 100644 --- a/lib/deploy.nix +++ b/lib/deploy.nix @@ -12,7 +12,7 @@ with pkgs.lib; } ${concatMapStrings (host: '' echo "deploying ${host.config.networking.hostName}..." - ${host.config.system.build.deployScript} $1 & + ${host.config.system.build.deployScript} PID_LIST+=" $!" '') hosts} # FIXME: remove jobs from PIDLIST once they finish diff --git a/modules/nixos/deploy/default.nix b/modules/nixos/deploy/default.nix index f9dd8d00..3aa40418 100644 --- a/modules/nixos/deploy/default.nix +++ b/modules/nixos/deploy/default.nix @@ -11,14 +11,13 @@ let } cat > ${file.path} chmod ${file.mode} ${file.path} - chown ${file.owner}:${file.group} ${file.path}"'' + chown ${file.owner}:${file.group} ${file.path}"'' + (if file.source != null then '' < ${toString file.source} '' else '' <<${if hasPrefix "__FUCKERY__" file.text then "EOF" else "'EOF'"} ${removePrefix "__FUCKERY__" file.text} - EOF - '')) (attrValues config.secrets.files); + EOF'')) (attrValues config.secrets.files); in { options = { deploy = {