18 lines
507 B
Nix
18 lines
507 B
Nix
{ config, lib, ... }: {
|
|
options.snowflake.networking.wakeOnLan = {
|
|
enable = lib.mkEnableOption "enable wake on LAN";
|
|
interface = lib.mkOption {
|
|
type = lib.types.str;
|
|
description = "interface name for wakeon lan";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf config.snowflake.networking.wakeOnLan.enable {
|
|
# will start working on the 2nd reboot
|
|
networking.interfaces = {
|
|
"${config.snowflake.networking.wakeOnLan.interface}" = {
|
|
wakeOnLan.enable = true;
|
|
};
|
|
};
|
|
};
|
|
}
|