From 8e3aa2d6ee1abb56a13054e0ab8bf680e9501d90 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Mon, 3 Apr 2023 18:05:56 +0200 Subject: Add boot log --- flake.nix | 1 + modules/base.nix | 1 + modules/infra-logs.nix | 16 ++++++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 modules/infra-logs.nix diff --git a/flake.nix b/flake.nix index ddbfdcd..19d19a8 100755 --- a/flake.nix +++ b/flake.nix @@ -25,6 +25,7 @@ ]; specialArgs = { inherit home-manager; + inherit secrets; }; }; Spacebar-synapse = nixpkgs.lib.nixosSystem { diff --git a/modules/base.nix b/modules/base.nix index 537e7e6..a87153f 100755 --- a/modules/base.nix +++ b/modules/base.nix @@ -4,6 +4,7 @@ imports = [ ./monitoring.nix + ./infra-logs.nix ./users/Rory.nix ./users/chris.nix ./users/maddy.nix 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"; + }; + }; + }; +} + -- cgit 1.4.1