Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@

# Laptop: power optimizations, etc.
./laptop.nix
# Fleet observability (logs + metrics shipping)
./o11y.nix
];

securix.self.machine = {
Expand Down
50 changes: 50 additions & 0 deletions common/o11y.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# SPDX-FileCopyrightText: 2026 Mihai Saveanu <darkangel@ladomotique.eu>
#
# SPDX-License-Identifier: MIT

# Observability configuration for Bureautix fleet.
# Enables log shipping and metrics collection using Securix o11y modules.
# Requires a central log/metrics server to receive data.
{
lib,
config,
...
}:
let
cfg = config.bureautix.o11y;
inherit (lib)
mkEnableOption
mkOption
types
mkIf
;
in
{
options.bureautix.o11y = {
enable = mkEnableOption "fleet observability (logs and metrics shipping)";

logsUrl = mkOption {
type = types.str;
description = "URL du serveur central de collecte des journaux (journal-upload)";
example = "https://logs.example.com";
};

metricsUrl = mkOption {
type = types.str;
description = "URL du serveur central de collecte des métriques (VictoriaMetrics/Prometheus)";
example = "https://metrics.example.com/api/v1/write";
};
};

config = mkIf cfg.enable {
securix.o11y.logs = {
enable = true;
serverUrl = cfg.logsUrl;
};

securix.o11y.metrics = {
enable = true;
serverUrl = cfg.metricsUrl;
};
};
}