mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 19:34:06 +00:00
nixos/services.lldpd: remove with lib;
This commit is contained in:
parent
0d57426bae
commit
196a14a174
@ -1,7 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.lldpd;
|
||||
|
||||
@ -9,17 +6,17 @@ in
|
||||
|
||||
{
|
||||
options.services.lldpd = {
|
||||
enable = mkEnableOption "Link Layer Discovery Protocol Daemon";
|
||||
enable = lib.mkEnableOption "Link Layer Discovery Protocol Daemon";
|
||||
|
||||
extraArgs = mkOption {
|
||||
type = types.listOf types.str;
|
||||
extraArgs = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [];
|
||||
example = [ "-c" "-k" "-I eth0" ];
|
||||
description = "List of command line parameters for lldpd";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
users.users._lldpd = {
|
||||
description = "lldpd user";
|
||||
group = "_lldpd";
|
||||
@ -33,7 +30,7 @@ in
|
||||
|
||||
systemd.services.lldpd = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
environment.LLDPD_OPTIONS = concatStringsSep " " cfg.extraArgs;
|
||||
environment.LLDPD_OPTIONS = lib.concatStringsSep " " cfg.extraArgs;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user