chore: housekeeping and formatting

Changed files
+52 -37
systems
koumakan
services
+4 -4
nix.code-workspace
···
}
],
"settings": {
-
"deno.enable": true,
+
"deno.enable": true,
"deno.lint": true,
"deno.unstable": false,
-
"files.exclude": {
-
"result": true
-
}
+
"files.exclude": {
+
"result": true
+
}
}
}
+19 -19
systems/koumakan/default.nix
···
inputs,
sopsDir,
...
-
}:
-
lib.nixosSystem {
+
}: let
system = "x86_64-linux";
+
in
+
lib.nixosSystem {
+
inherit system;
-
# see docs/tips_n_tricks.md#extra_opts for syntax
-
# see docs/utils.md for functions
-
specialArgs = {
-
inherit inputs sopsDir;
-
_utils = utils {
-
inherit inputs;
-
system = "x86_64-linux";
+
# see docs/tips_n_tricks.md#extra_opts for syntax
+
# see docs/utils.md for functions
+
specialArgs = {
+
inherit inputs sopsDir;
+
_utils = utils {
+
inherit inputs system;
+
};
};
-
};
-
modules = [
-
inputs.lanzaboote.nixosModules.lanzaboote
-
inputs.attic.nixosModules.atticd
-
inputs.sops-nix.nixosModules.sops
-
inputs.mystia.nixosModules.fixups
-
inputs.mystia.nixosModules.vmauth
+
modules = [
+
inputs.lanzaboote.nixosModules.lanzaboote
+
inputs.attic.nixosModules.atticd
+
inputs.mystia.nixosModules.fixups
+
inputs.mystia.nixosModules.vmauth
-
./configuration.nix
-
];
-
}
+
./configuration.nix
+
];
+
}
+7 -5
systems/koumakan/services/telemetry/grafana/provisioning.nix
···
dashboards.settings = {
apiVersion = 1; # same as above
-
providers = [{
-
name = "flake";
-
allowUiUpdates = false;
-
options.path = ./dashboards;
-
}];
+
providers = [
+
{
+
name = "flake";
+
allowUiUpdates = false;
+
options.path = ./dashboards;
+
}
+
];
};
};
}
+22 -9
systems/koumakan/services/telemetry/victoriametrics.nix
···
job_name = "node";
scrape_interval = "15s";
static_configs = [{targets = ["localhost:${builtins.toString config.services.prometheus.exporters.node.port}"];}];
-
relabel_configs = [{target_label = "instance"; replacement = "koumakan";}];
+
relabel_configs = [
+
{
+
target_label = "instance";
+
replacement = "koumakan";
+
}
+
];
}
# external nodes uses remote write
···
{
job_name = "nginx";
static_configs = [{targets = ["localhost:${builtins.toString config.services.prometheus.exporters.nginx.port}"];}];
-
relabel_configs = [{target_label = "instance"; replacement = "koumakan";}];
+
relabel_configs = [
+
{
+
target_label = "instance";
+
replacement = "koumakan";
+
}
+
];
}
{
···
enable = true;
listenAddress = "127.0.0.1:21000";
authConfig = {
-
users = builtins.concatMap (token: [{
-
bearer_token = token;
-
url_prefix = "http://${config.services.victoriametrics.listenAddress}"; # send directly to vm
-
}]) [
-
"%{AUTH_MAIL_TOKEN}"
-
"%{AUTH_GATEWAY_TOKEN}"
-
];
+
users =
+
builtins.concatMap (token: [
+
{
+
bearer_token = token;
+
url_prefix = "http://${config.services.victoriametrics.listenAddress}"; # send directly to vm
+
}
+
]) [
+
"%{AUTH_MAIL_TOKEN}"
+
"%{AUTH_GATEWAY_TOKEN}"
+
];
};
environmentFile = secrets.getTemplate "vmauth.env";
};