nixos/containers: add wants and after dependency for network interfaces (#153234)

Co-authored-by: Franz Pletz <fpletz@fnordicwalking.de>
This commit is contained in:
Sohalt 2024-07-22 01:22:19 +02:00 committed by GitHub
parent 949797e26e
commit c11439943d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -842,8 +842,8 @@ in
optionalAttrs containerConfig.autoStart
{
wantedBy = [ "machines.target" ];
wants = [ "network.target" ];
after = [ "network.target" ];
wants = [ "network.target" ] ++ (map (i: "sys-subsystem-net-devices-${i}.device") cfg.interfaces);
after = [ "network.target" ] ++ (map (i: "sys-subsystem-net-devices-${i}.device") cfg.interfaces);
restartTriggers = [
containerConfig.path
config.environment.etc."${configurationDirectoryName}/${name}.conf".source