{ 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"; }; }; }