nixos/services.envoy: remove with lib;

This commit is contained in:
Felix Buehler
2024-09-15 10:43:54 +02:00
committed by Jörg Thalheim
parent aa2c039ab0
commit a09250d8ab
+7 -10
View File
@@ -1,7 +1,4 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.envoy;
format = pkgs.formats.json { };
@@ -15,12 +12,12 @@ in
{
options.services.envoy = {
enable = mkEnableOption "Envoy reverse proxy";
enable = lib.mkEnableOption "Envoy reverse proxy";
package = mkPackageOption pkgs "envoy" { };
package = lib.mkPackageOption pkgs "envoy" { };
requireValidConfig = mkOption {
type = types.bool;
requireValidConfig = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Whether a failure during config validation at build time is fatal.
@@ -29,10 +26,10 @@ in
'';
};
settings = mkOption {
settings = lib.mkOption {
type = format.type;
default = { };
example = literalExpression ''
example = lib.literalExpression ''
{
admin = {
access_log_path = "/dev/null";
@@ -56,7 +53,7 @@ in
};
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
systemd.services.envoy = {
description = "Envoy reverse proxy";