Skip to content

Commit

Permalink
nixfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
manveru committed Dec 9, 2020
1 parent fb8182a commit d4c0cf9
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 16 deletions.
3 changes: 2 additions & 1 deletion lib/nomad-job.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions modules/ingress-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
10 changes: 5 additions & 5 deletions modules/telegraf.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
Expand All @@ -49,7 +49,6 @@ in {
};
};


###### implementation
config = mkIf config.services.telegraf.enable {
systemd.services.telegraf = {
Expand All @@ -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";
};
Expand Down
5 changes: 2 additions & 3 deletions overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };

Expand All @@ -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 ];
Expand Down
9 changes: 6 additions & 3 deletions pkgs/loki.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ stdenv, lib, buildGoModule, fetchFromGitHub, makeWrapper, systemd, fetchpatch }:
{ stdenv, lib, buildGoModule, fetchFromGitHub, makeWrapper, systemd, fetchpatch
}:

buildGoModule rec {
version = "2.0.0";
Expand All @@ -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=";
})
];
Expand Down
3 changes: 2 additions & 1 deletion profiles/nomad/client.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};

Expand Down
3 changes: 2 additions & 1 deletion profiles/telegraf.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down

0 comments on commit d4c0cf9

Please sign in to comment.