nixos/wakeonlan: add types
This commit is contained in:
parent
4015c5ca9c
commit
087011cc68
1 changed files with 14 additions and 0 deletions
|
@ -31,6 +31,20 @@ in
|
|||
|
||||
services.wakeonlan.interfaces = mkOption {
|
||||
default = [ ];
|
||||
type = types.listOf (types.submodule { options = {
|
||||
interface = mkOption {
|
||||
type = types.str;
|
||||
description = "Interface to enable for Wake-On-Lan.";
|
||||
};
|
||||
method = mkOption {
|
||||
type = types.enum [ "magicpacket" "password"];
|
||||
description = "Wake-On-Lan method for this interface.";
|
||||
};
|
||||
password = mkOption {
|
||||
type = types.strMatching "[a-fA-F0-9]{2}:([a-fA-F0-9]{2}:){4}[a-fA-F0-9]{2}";
|
||||
description = "The password has the shape of six bytes in hexadecimal separated by a colon each.";
|
||||
};
|
||||
};});
|
||||
example = [
|
||||
{
|
||||
interface = "eth0";
|
||||
|
|
Loading…
Reference in a new issue