diff options
author | Felix Buehler <account@buehler.rocks> | 2024-08-27 20:43:33 +0200 |
---|---|---|
committer | Felix Buehler <account@buehler.rocks> | 2024-08-30 00:30:58 +0200 |
commit | 28072b63dde295735a30087e0b293c37531cc256 (patch) | |
tree | 7b62cbc387a5349e9712e422d511e1211d97262c | |
parent | 640892113aa0a2ff0f2090fd49d0cc7ed8f608ca (diff) |
nixos/services.vector: remove `with lib;`
-rw-r--r-- | nixos/modules/services/logging/vector.nix | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/nixos/modules/services/logging/vector.nix b/nixos/modules/services/logging/vector.nix index 129a38b1d20f0..c68d546bb96cd 100644 --- a/nixos/modules/services/logging/vector.nix +++ b/nixos/modules/services/logging/vector.nix @@ -1,24 +1,22 @@ { config, lib, pkgs, ... }: - -with lib; let cfg = config.services.vector; in { options.services.vector = { - enable = mkEnableOption "Vector, a high-performance observability data pipeline"; + enable = lib.mkEnableOption "Vector, a high-performance observability data pipeline"; - package = mkPackageOption pkgs "vector" { }; + package = lib.mkPackageOption pkgs "vector" { }; - journaldAccess = mkOption { - type = types.bool; + journaldAccess = lib.mkOption { + type = lib.types.bool; default = false; description = '' Enable Vector to access journald. ''; }; - settings = mkOption { + settings = lib.mkOption { type = (pkgs.formats.json { }).type; default = { }; description = '' @@ -27,7 +25,7 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { # for cli usage environment.systemPackages = [ pkgs.vector ]; @@ -49,14 +47,14 @@ in ''; in { - ExecStart = "${getExe cfg.package} --config ${validateConfig conf}"; + ExecStart = "${lib.getExe cfg.package} --config ${validateConfig conf}"; DynamicUser = true; Restart = "always"; StateDirectory = "vector"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; AmbientCapabilities = "CAP_NET_BIND_SERVICE"; # This group is required for accessing journald. - SupplementaryGroups = mkIf cfg.journaldAccess "systemd-journal"; + SupplementaryGroups = lib.mkIf cfg.journaldAccess "systemd-journal"; }; unitConfig = { StartLimitIntervalSec = 10; |