diff options
author | Karel Kočí <cynerd@email.cz> | 2022-01-02 17:23:58 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2022-04-12 21:48:06 +0200 |
commit | 5339e045194c5ad482250c0271959a5fd9f97db2 (patch) | |
tree | 44d068a2c15b4683f0eb124044bf8c59bda398d1 /nixos/modules/sentinel-fwlogs.nix | |
parent | 00e3489cc7ea1edc3e71aaa94a62efbd13d65e49 (diff) | |
download | nixturris-5339e045194c5ad482250c0271959a5fd9f97db2.tar.gz nixturris-5339e045194c5ad482250c0271959a5fd9f97db2.tar.bz2 nixturris-5339e045194c5ad482250c0271959a5fd9f97db2.zip |
nios: Add sentinel module
Diffstat (limited to 'nixos/modules/sentinel-fwlogs.nix')
-rw-r--r-- | nixos/modules/sentinel-fwlogs.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/nixos/modules/sentinel-fwlogs.nix b/nixos/modules/sentinel-fwlogs.nix new file mode 100644 index 0000000..b7b056a --- /dev/null +++ b/nixos/modules/sentinel-fwlogs.nix @@ -0,0 +1,37 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + + imports = [ ./sentinel.nix ]; + + + options = { + + services.sentinel.fwlogs = { + enable = mkOption { + type = types.bool; + default = true; + description = '' + Whether to enable the Turris Sentinel Firewall logs collector. + The services.sentinel.enable has to be enabled as well. + ''; + }; + }; + }; + + + config = mkIf config.services.sentinel.enable && config.services.sentinel.fwlogs.enable { + environment.systemPackages = [ pkgs.sentinel-fwlogs ]; + + systemd.services.sentinel-fwlogs = { + description = "Turris Sentinel Firewall Logs"; + wantedBy = [ "multi-user.target" ]; + path = [ pkgs.sentinel-fwlogs ]; + serviceConfig.ExecStart = "${pkgs.sentinel-fwlogs}/bin/sentinel-fwlogs"; + }; + + }; + +} |