diff --git a/lib/nomad-job.nix b/lib/nomad-job.nix index a4ff4d85..5e3f0af1 100644 --- a/lib/nomad-job.nix +++ b/lib/nomad-job.nix @@ -857,7 +857,8 @@ let }; changeSignal = mkOption { - type = nullOr (enum [ "SIGHUP" "SIGINT" "SIGUSR1" "SIGUSR2" "SIGTERM" ]); + type = + nullOr (enum [ "SIGHUP" "SIGINT" "SIGUSR1" "SIGUSR2" "SIGTERM" ]); default = null; description = '' Specifies the signal to send to the task as a string like "SIGUSR1" or "SIGINT". This option is required if the ChangeMode is signal. diff --git a/modules/ingress-config.nix b/modules/ingress-config.nix index d3d97173..b0d6431b 100644 --- a/modules/ingress-config.nix +++ b/modules/ingress-config.nix @@ -160,8 +160,7 @@ in { environment = { CONSUL_HTTP_ADDR = "http://127.0.0.1:8500"; - VAULT_ADDR = - "https://${instances.core-1.privateIP}:8200"; + VAULT_ADDR = "https://${instances.core-1.privateIP}:8200"; inherit (config.environment.variables) VAULT_CACERT; }; diff --git a/modules/telegraf.nix b/modules/telegraf.nix index cedf395c..19b68406 100644 --- a/modules/telegraf.nix +++ b/modules/telegraf.nix @@ -28,13 +28,13 @@ in { }; extraConfig = mkOption { - default = {}; + default = { }; description = "Extra configuration options for telegraf"; type = types.attrs; example = { outputs = { influxdb = { - urls = ["http://localhost:8086"]; + urls = [ "http://localhost:8086" ]; database = "telegraf"; }; }; @@ -49,7 +49,6 @@ in { }; }; - ###### implementation config = mkIf config.services.telegraf.enable { systemd.services.telegraf = { @@ -58,8 +57,9 @@ in { after = [ "network-online.target" ]; serviceConfig = { ExecStartPre = "!${preScript}/bin/telegraf-start-pre"; - ExecStart=''${cfg.package}/bin/telegraf -config /etc/telegraf/config.toml''; - ExecReload="${pkgs.coreutils}/bin/kill -HUP $MAINPID"; + ExecStart = + "${cfg.package}/bin/telegraf -config /etc/telegraf/config.toml"; + ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; User = "telegraf"; Restart = "on-failure"; }; diff --git a/overlay.nix b/overlay.nix index 5fe96893..07ae77e7 100644 --- a/overlay.nix +++ b/overlay.nix @@ -82,7 +82,7 @@ in final: prev: { seaweedfs = prev.callPackage ./pkgs/seaweedfs.nix { }; - boundary = prev.callPackage ./pkgs/boundary.nix {}; + boundary = prev.callPackage ./pkgs/boundary.nix { }; grpcdump = prev.callPackage ./pkgs/grpcdump.nix { }; @@ -102,8 +102,7 @@ in final: prev: { systemdSandbox = final.callPackage ./lib/systemd-sandbox.nix { }; - scaler-guard = let - deps = with final; [ awscli bash curl jq nomad ]; + scaler-guard = let deps = with final; [ awscli bash curl jq nomad ]; in prev.runCommandLocal "scaler-guard" { script = ./scripts/scaler-guard.sh; nativeBuildInputs = [ prev.makeWrapper ]; diff --git a/pkgs/loki.nix b/pkgs/loki.nix index b5e2fc7c..84a8c063 100644 --- a/pkgs/loki.nix +++ b/pkgs/loki.nix @@ -1,4 +1,5 @@ -{ stdenv, lib, buildGoModule, fetchFromGitHub, makeWrapper, systemd, fetchpatch }: +{ stdenv, lib, buildGoModule, fetchFromGitHub, makeWrapper, systemd, fetchpatch +}: buildGoModule rec { version = "2.0.0"; @@ -19,13 +20,15 @@ buildGoModule rec { (fetchpatch { # Fix expected return value in Test_validateDropConfig # https://github.com/grafana/loki/issues/2519 - url = "https://github.com/grafana/loki/commit/1316c0f0c5cda7c272c4873ea910211476fc1db8.patch"; + url = + "https://github.com/grafana/loki/commit/1316c0f0c5cda7c272c4873ea910211476fc1db8.patch"; sha256 = "06hwga58qpmivbhyjgyqzb75602hy8212a4b5vh99y9pnn6c913h"; }) (fetchpatch { # Skip journald bad message # https://github.com/grafana/loki/pull/2928 - url = "https://github.com/grafana/loki/commit/69fffc0039fff65d939a382a15a9a8e2b57f7193.patch"; + url = + "https://github.com/grafana/loki/commit/69fffc0039fff65d939a382a15a9a8e2b57f7193.patch"; sha256 = "sha256-8LMbA6Uw0J9RjWkxcPnUr2Wx7jfYSyosh+BG1DdXnLQ="; }) ]; diff --git a/profiles/nomad/client.nix b/profiles/nomad/client.nix index 278d974b..d5857b7d 100644 --- a/profiles/nomad/client.nix +++ b/profiles/nomad/client.nix @@ -9,7 +9,8 @@ gc_interval = "12h"; chroot_env = { # "/usr/bin/env" = "/usr/bin/env"; - "${builtins.unsafeDiscardStringContext pkgs.pkgsStatic.busybox}" = "/usr"; + "${builtins.unsafeDiscardStringContext pkgs.pkgsStatic.busybox}" = + "/usr"; }; }; diff --git a/profiles/telegraf.nix b/profiles/telegraf.nix index d64a1455..a9c98207 100644 --- a/profiles/telegraf.nix +++ b/profiles/telegraf.nix @@ -35,7 +35,8 @@ in { prometheus = { #urls = [ "http://127.0.0.1:3101/metrics" "http://127.0.0.1:9334" ]; urls = [ "http://127.0.0.1:3101/metrics" ] - ++ optional config.services.loki.enable "http://127.0.0.1:3100/metrics"; + ++ optional config.services.loki.enable + "http://127.0.0.1:3100/metrics"; metric_version = 2; };