nixos/services.gobgpd: remove with lib;

This commit is contained in:
Felix Buehler 2024-08-28 21:19:09 +02:00 committed by Jörg Thalheim
parent 90a98fc103
commit a811ef8255

View File

@ -1,16 +1,13 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.services.gobgpd;
format = pkgs.formats.toml { };
confFile = format.generate "gobgpd.conf" cfg.settings;
in {
options.services.gobgpd = {
enable = mkEnableOption "GoBGP Routing Daemon";
enable = lib.mkEnableOption "GoBGP Routing Daemon";
settings = mkOption {
settings = lib.mkOption {
type = format.type;
default = { };
description = ''
@ -18,7 +15,7 @@ in {
<https://github.com/osrg/gobgp#documentation>
for details on supported values.
'';
example = literalExpression ''
example = lib.literalExpression ''
{
global = {
config = {
@ -45,7 +42,7 @@ in {
};
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
environment.systemPackages = [ pkgs.gobgpd ];
systemd.services.gobgpd = {
wantedBy = [ "multi-user.target" ];