fork
Configure Feed
Select the types of activity you want to include in your feed.
lol
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{ config, lib, pkgs, ... }:
2
3with lib;
4
5let
6 cfg = config.services.lldpd;
7
8in
9
10{
11 options.services.lldpd = {
12 enable = mkEnableOption (lib.mdDoc "Link Layer Discovery Protocol Daemon");
13
14 extraArgs = mkOption {
15 type = types.listOf types.str;
16 default = [];
17 example = [ "-c" "-k" "-I eth0" ];
18 description = lib.mdDoc "List of command line parameters for lldpd";
19 };
20 };
21
22 config = mkIf cfg.enable {
23 users.users._lldpd = {
24 description = "lldpd user";
25 group = "_lldpd";
26 home = "/run/lldpd";
27 isSystemUser = true;
28 };
29 users.groups._lldpd = {};
30
31 environment.systemPackages = [ pkgs.lldpd ];
32 systemd.packages = [ pkgs.lldpd ];
33
34 systemd.services.lldpd = {
35 wantedBy = [ "multi-user.target" ];
36 environment.LLDPD_OPTIONS = concatStringsSep " " cfg.extraArgs;
37 };
38 };
39}