nixos/nixos-containers: fix interface name escaping in systemd.device unit name
systemd escapes interface names in generated .device units. e.g. dummy-test -> dummy\x2dtest
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
utils,
|
||||
...
|
||||
}@host:
|
||||
|
||||
@@ -1052,8 +1053,8 @@ in
|
||||
}
|
||||
// (optionalAttrs containerConfig.autoStart {
|
||||
wantedBy = [ "machines.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);
|
||||
wants = [ "network.target" ] ++ (map (i: "sys-subsystem-net-devices-${utils.escapeSystemdPath i}.device") cfg.interfaces);
|
||||
after = [ "network.target" ] ++ (map (i: "sys-subsystem-net-devices-${utils.escapeSystemdPath i}.device") cfg.interfaces);
|
||||
restartTriggers = [
|
||||
containerConfig.path
|
||||
config.environment.etc."${configurationDirectoryName}/${name}.conf".source
|
||||
|
||||
Reference in New Issue
Block a user