8 cfg = config.services.lldpd;
13 options.services.lldpd = {
14 enable = lib.mkEnableOption "Link Layer Discovery Protocol Daemon";
16 extraArgs = lib.mkOption {
17 type = lib.types.listOf lib.types.str;
24 description = "List of command line parameters for lldpd";
28 config = lib.mkIf cfg.enable {
29 users.users._lldpd = {
30 description = "lldpd user";
35 users.groups._lldpd = { };
37 environment.systemPackages = [ pkgs.lldpd ];
38 systemd.packages = [ pkgs.lldpd ];
40 systemd.services.lldpd = {
41 wantedBy = [ "multi-user.target" ];
42 environment.LLDPD_OPTIONS = lib.concatStringsSep " " cfg.extraArgs;