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>
This commit is contained in:
parent
0696b0ef78
commit
030895f075
@ -184,7 +184,7 @@ in
|
||||
}
|
||||
];
|
||||
|
||||
powerManagement.resumeCommands =
|
||||
powerManagement.resumeCommands = mkIf config.systemd.services.dhcpcd.enable
|
||||
''
|
||||
# Tell dhcpcd to rebind its interfaces if it's running.
|
||||
${config.systemd.package}/bin/systemctl reload dhcpcd.service
|
||||
|
Loading…
Reference in New Issue
Block a user