diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-08-08 20:51:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-08 20:51:27 +0200 |
commit | c9e66e9d45bd192d81ca1ae08da3e76bfd96054a (patch) | |
tree | 227b307ea376e456192faa0e593dc2696bf97d6d /nixos/modules/services/networking/wakeonlan.nix | |
parent | d9ca70d15bbebb5a822289d921bca826382461f7 (diff) | |
parent | 087011cc68bc0b8a955220ec400a6bad9d0819e9 (diff) | |
download | nixpkgs-c9e66e9d45bd192d81ca1ae08da3e76bfd96054a.tar nixpkgs-c9e66e9d45bd192d81ca1ae08da3e76bfd96054a.tar.gz nixpkgs-c9e66e9d45bd192d81ca1ae08da3e76bfd96054a.tar.bz2 nixpkgs-c9e66e9d45bd192d81ca1ae08da3e76bfd96054a.tar.lz nixpkgs-c9e66e9d45bd192d81ca1ae08da3e76bfd96054a.tar.xz nixpkgs-c9e66e9d45bd192d81ca1ae08da3e76bfd96054a.tar.zst nixpkgs-c9e66e9d45bd192d81ca1ae08da3e76bfd96054a.zip |
Merge pull request #111442 from helsinki-systems/wakeonlan
nixos/wakeonlan: add types
Diffstat (limited to 'nixos/modules/services/networking/wakeonlan.nix')
-rw-r--r-- | nixos/modules/services/networking/wakeonlan.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/wakeonlan.nix b/nixos/modules/services/networking/wakeonlan.nix index f41b6ec2740..c6291366b0f 100644 --- a/nixos/modules/services/networking/wakeonlan.nix +++ b/nixos/modules/services/networking/wakeonlan.nix @@ -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"; |