nixos/dhcpcd: Only run resume commands if enabled.

The networkd implementation sets systemd.services.dhcpcd.enable to
false in nixos/modules/tasks/network-interfaces-systemd.nix. So we need
to respect that in the dhcpcd module.

If we don't, the resumeCommand is set nevertheless, which causes the
post-resume.service to fail after resuming:

Failed to reload dhcpcd.service: Unit dhcpcd.service is masked.
post-resume.service: main process exited, code=exited, status=1/FAILURE
Failed to start Post-Resume Actions.
Dependency failed for Post-Resume Actions.
Unit post-resume.service entered failed state.
post-resume.service failed.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>

aszlig 030895f0 0696b0ef

+1 -1
+1 -1
nixos/modules/services/networking/dhcpcd.nix
··· 184 184 } 185 185 ]; 186 186 187 - powerManagement.resumeCommands = 187 + powerManagement.resumeCommands = mkIf config.systemd.services.dhcpcd.enable 188 188 '' 189 189 # Tell dhcpcd to rebind its interfaces if it's running. 190 190 ${config.systemd.package}/bin/systemctl reload dhcpcd.service