From bd9812fab0daea5f0911047a70494dc25089ac79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 9 Apr 2022 10:17:34 +0200 Subject: Initial version This was taken from nixturris. --- nixos/modules/sentinel-faillogs.nix | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 nixos/modules/sentinel-faillogs.nix (limited to 'nixos/modules/sentinel-faillogs.nix') diff --git a/nixos/modules/sentinel-faillogs.nix b/nixos/modules/sentinel-faillogs.nix new file mode 100644 index 0000000..93ade14 --- /dev/null +++ b/nixos/modules/sentinel-faillogs.nix @@ -0,0 +1,36 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + + imports = [ ./sentinel.nix ]; + + + options = { + services.sentinel.faillogs = { + enable = mkOption { + type = types.bool; + default = true; + description = '' + Whether to enable the Turris Sentinel Fail logs collector. + The services.sentinel.enable has to be enabled as well. + ''; + }; + }; + }; + + + config = mkIf config.services.sentinel.enable && config.services.sentinel.faillogs.enable { + environment.systemPackages = [ pkgs.sentinel-faillogs ]; + + systemd.services.sentinel-faillogs = { + description = "Turris Sentinel Fail Logs"; + wantedBy = [ "multi-user.target" ]; + path = [ pkgs.sentinel-faillogs ]; + serviceConfig.ExecStart = "${pkgs.sentinel-faillogs}/bin/sentinel-faillogs"; + }; + + }; + +} -- cgit v1.2.3