From f462cf15f8fa084c602c4269296d3dc174bea6f8 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Mon, 7 Sep 2020 14:47:28 +0200 Subject: [PATCH] wakeonlan service: use powerUpCommands powerDownCommands is supposed to run before shutdown, but the current implementation only runs before-sleep, thus not enabling wakeonlan on devices when powering off even if the hardware supports it. Taking into consideration the possibility of unexpected shutdown, it is preferable to move the commands to powerUpCommands instead which is executed at boot time as well as after resume - that should cover all use cases for wakeonlan. Fixes #91352 --- nixos/modules/services/networking/wakeonlan.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/wakeonlan.nix b/nixos/modules/services/networking/wakeonlan.nix index ebfba263cd8f..35ff67937fc7 100644 --- a/nixos/modules/services/networking/wakeonlan.nix +++ b/nixos/modules/services/networking/wakeonlan.nix @@ -51,6 +51,6 @@ in ###### implementation - config.powerManagement.powerDownCommands = lines; + config.powerManagement.powerUpCommands = lines; }