add report service

This commit is contained in:
Sean Buckley 2020-11-13 14:49:22 -05:00
parent efcffa2bf6
commit 25ad587986

View file

@ -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}'"
];
};
}