From e7edad891f59a7f9e550ef38b73659b02914cdb9 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Sat, 18 Nov 2023 12:51:14 +0100 Subject: [PATCH] add taskwarrior autotag --- nixos/machines/chungus/configuration.nix | 4 +-- .../machines/chungus/taskwarrior-autotag.nix | 28 +++++++++++++++++++ nixos/machines/robi/telegraf.nix | 11 +++++++- 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 nixos/machines/chungus/taskwarrior-autotag.nix diff --git a/nixos/machines/chungus/configuration.nix b/nixos/machines/chungus/configuration.nix index 644b303..682d9b0 100644 --- a/nixos/machines/chungus/configuration.nix +++ b/nixos/machines/chungus/configuration.nix @@ -22,11 +22,11 @@ #./mail-fetcher.nix #./borg.nix - #./taskwarrior-pushover.nix + ./taskwarrior-autotag.nix ./media-share.nix ./media-audiobookshelf.nix - ./media-tdarr.nix + #./media-tdarr.nix ./media-jellyfin.nix ./media-youtube.nix ./media-castget.nix diff --git a/nixos/machines/chungus/taskwarrior-autotag.nix b/nixos/machines/chungus/taskwarrior-autotag.nix new file mode 100644 index 0000000..9706244 --- /dev/null +++ b/nixos/machines/chungus/taskwarrior-autotag.nix @@ -0,0 +1,28 @@ +{ config, lib, pkgs, ... }: + +{ + sops.secrets.autotagTaskwarriorCa = { + owner = "taskwarrior-autotag"; + key = "taskwarriorCa"; + }; + sops.secrets.autotagTaskwarriorCertificate = { + owner = "taskwarrior-autotag"; + key = "taskwarriorCertificate"; + }; + sops.secrets.autotagTaskwarriorKey = { + owner = "taskwarrior-autotag"; + key = "taskwarriorKey"; + }; + + services.taskwarrior-autotag = { + enable = true; + recurrence = "off"; + onCalendar = "hourly"; + server = "taskd.ingolf-wagner.de:53589"; + caFile = config.sops.secrets.autotagTaskwarriorCa.path; + certificateFile = config.sops.secrets.autotagTaskwarriorCertificate.path; + keyFile = config.sops.secrets.autotagTaskwarriorKey.path; + credentials = "1337/palo/ad40dce8-4b38-4011-b032-60a91b6f22cd"; + }; + +} diff --git a/nixos/machines/robi/telegraf.nix b/nixos/machines/robi/telegraf.nix index caa8d24..5e7c662 100644 --- a/nixos/machines/robi/telegraf.nix +++ b/nixos/machines/robi/telegraf.nix @@ -8,9 +8,18 @@ }; # https://github.com/influxdata/telegraf/tree/master/plugins/inputs < all them plugins inputs = { - cpu = { }; + cpu = { + percpu = true; + totalcpu = true; + }; + disk = { }; diskio = { }; + kernel = { }; + mem = { }; processes = { }; + netstat = { }; + net = { }; + system = { }; systemd_units = { }; nginx.urls = [ "http://localhost/nginx_status" ]; };