From 25ad587986bfd7cd81c60975f635a9f10cc0551d Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Fri, 13 Nov 2020 14:49:22 -0500 Subject: [PATCH] add report service --- modules/baseline.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/baseline.nix b/modules/baseline.nix index 235db9a..1c9bcad 100644 --- a/modules/baseline.nix +++ b/modules/baseline.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: { time.timeZone = "US/Eastern"; @@ -32,4 +32,16 @@ publish.addresses = true; }; }; + + systemd.timers.nixosReport.timerConfig.RandomizedDelaySec = "55min"; + systemd.services.nixosReport = { + startAt = "hourly"; + serviceConfig.Type = "simple"; + serviceConfig.ExecStart = lib.concatStringsSep " " [ + "${pkgs.curl}/bin/curl --silent https://log.bck.me/nixos-report" + "-H 'hostname: ${config.networking.hostName}'" + "-H 'version: ${config.system.nixos.label}'" + "-H 'imports: ${lib.concatMapStringsSep " " toString (pkgs.callPackage /etc/nixos/configuration.nix { }).imports}'" + ]; + }; }