summary refs log tree commit diff
path: root/modules/infra-logs.nix
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-04-03 18:05:56 +0200
committerRory& <root@rory.gay>2024-06-05 15:52:38 +0200
commit8e3aa2d6ee1abb56a13054e0ab8bf680e9501d90 (patch)
tree83ead88ea16369394a4400153cbebacc568c5717 /modules/infra-logs.nix
parentFix inputs (diff)
downloadSpacebar-Open-Infrastructure-8e3aa2d6ee1abb56a13054e0ab8bf680e9501d90.tar.xz
Add boot log
Diffstat (limited to 'modules/infra-logs.nix')
-rw-r--r--modules/infra-logs.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/infra-logs.nix b/modules/infra-logs.nix
new file mode 100644
index 0000000..0ca78a0
--- /dev/null
+++ b/modules/infra-logs.nix
@@ -0,0 +1,16 @@
+{ config, pkgs, lib, secrets, ... }:
+{
+  systemd.services = {
+    "boot" = {
+        wantedBy = [ "multi-user.target" ];
+        serviceConfig = {
+            ExecStart = ''
+              ${pkgs.curl}/bin/curl -H "Content-Type: application/json" -d '{"username": "${config.networking.hostName}", "content": "System booted."}' ${secrets.webhooks.discord.deploy}
+              '';
+            #Restart = "never";
+            User = "root";
+        };
+    };
+  };
+}
+