From 8d5e9a79b7822b911995a9477127eb3b0c0ce18c Mon Sep 17 00:00:00 2001 From: osbm Date: Tue, 28 Jan 2025 03:34:22 +0300 Subject: [PATCH] add systemd thingy --- hosts/ymir/configuration.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hosts/ymir/configuration.nix b/hosts/ymir/configuration.nix index 515ef6c..ced6ccd 100644 --- a/hosts/ymir/configuration.nix +++ b/hosts/ymir/configuration.nix @@ -42,6 +42,18 @@ in { networking.networkmanager.enable = true; networking.interfaces.enp3s0.wakeOnLan.enable = true; + # The services doesn't actually work atm, define an additional service + # see https://github.com/NixOS/nixpkgs/issues/91352 + systemd.services.wakeonlan = { + description = "Reenable wake on lan every boot"; + after = [ "network.target" ]; + serviceConfig = { + Type = "simple"; + RemainAfterExit = "true"; + ExecStart = "${pkgs.ethtool}/sbin/ethtool -s enp3s0 wol g"; + }; + wantedBy = [ "default.target" ]; + }; hardware.nvidia-container-toolkit.enable = true;