1 { config, lib, pkgs, ... }:
6 cfg = config.services.lldpd;
11 options.services.lldpd = {
12 enable = mkEnableOption (lib.mdDoc "Link Layer Discovery Protocol Daemon");
14 extraArgs = mkOption {
15 type = types.listOf types.str;
17 example = [ "-c" "-k" "-I eth0" ];
18 description = lib.mdDoc "List of command line parameters for lldpd";
22 config = mkIf cfg.enable {
23 users.users._lldpd = {
24 description = "lldpd user";
29 users.groups._lldpd = {};
31 environment.systemPackages = [ pkgs.lldpd ];
32 systemd.packages = [ pkgs.lldpd ];
34 systemd.services.lldpd = {
35 wantedBy = [ "multi-user.target" ];
36 environment.LLDPD_OPTIONS = concatStringsSep " " cfg.extraArgs;