summary refs log tree commit diff
path: root/modules/auto-redeploy.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/auto-redeploy.nix')
-rw-r--r--modules/auto-redeploy.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/auto-redeploy.nix b/modules/auto-redeploy.nix
index ae415ca..d082ebb 100644
--- a/modules/auto-redeploy.nix
+++ b/modules/auto-redeploy.nix
@@ -49,8 +49,12 @@
                 nixos-rebuild switch --flake ".#${config.networking.hostName}" -j`nproc` --upgrade-all
                 git rm --cached hardware-configuration.nix
               ) 2>&1 | tee /tmp/update.log
-              #send the output to discord as a file
-              curl -S -F "file=@/tmp/update.log" -F "filename=update.log" -F "content=System finished redeploy. Logs:" -H "Content-Type: multipart/form-data" ${secrets.webhooks.discord.deploy}
+              #send the output to discord as a file, with hostname as username, use paload_json
+              curl -S -F "file=@/tmp/update.log" -F "filename=update.log" -F 'payload_json={"username": "${config.networking.hostName} - redeploy", "content": "Redeploy finished! Logs:"}' -H "Content-Type: multipart/form-data" ${secrets.webhooks.discord.deploy}
+              
+
+
+              
               #store current commit in file
               echo $(git rev-parse HEAD) > currentCommit
               '';