diff options
Diffstat (limited to 'nixpkgs/nixos/modules/services/networking/radvd.nix')
-rw-r--r-- | nixpkgs/nixos/modules/services/networking/radvd.nix | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/nixpkgs/nixos/modules/services/networking/radvd.nix b/nixpkgs/nixos/modules/services/networking/radvd.nix index 6e8db55bbf0d..72590eda4ee6 100644 --- a/nixpkgs/nixos/modules/services/networking/radvd.nix +++ b/nixpkgs/nixos/modules/services/networking/radvd.nix @@ -16,15 +16,15 @@ in ###### interface - options = { + options.services.radvd = { - services.radvd.enable = mkOption { + enable = mkOption { type = types.bool; default = false; description = - '' + lib.mdDoc '' Whether to enable the Router Advertisement Daemon - (<command>radvd</command>), which provides link-local + ({command}`radvd`), which provides link-local advertisements of IPv6 router addresses and prefixes using the Neighbor Discovery Protocol (NDP). This enables stateless address autoconfiguration in IPv6 clients on the @@ -32,7 +32,16 @@ in ''; }; - services.radvd.config = mkOption { + package = mkOption { + type = types.package; + default = pkgs.radvd; + defaultText = literalExpression "pkgs.radvd"; + description = lib.mdDoc '' + The RADVD package to use for the RADVD service. + ''; + }; + + config = mkOption { type = types.lines; example = '' @@ -42,7 +51,7 @@ in }; ''; description = - '' + lib.mdDoc '' The contents of the radvd configuration file. ''; }; @@ -67,7 +76,7 @@ in wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; serviceConfig = - { ExecStart = "@${pkgs.radvd}/bin/radvd radvd -n -u radvd -C ${confFile}"; + { ExecStart = "@${cfg.package}/bin/radvd radvd -n -u radvd -C ${confFile}"; Restart = "always"; }; }; |