fix(aya): runner

This commit is contained in:
arcnmx 2024-02-20 18:14:10 -08:00
parent d13eaaaca6
commit 3fcca353dd
7 changed files with 115 additions and 20 deletions

View file

@ -236,6 +236,9 @@
ExecStart = [
''${ip} netns add ${escapeSystemdExecArg config.name}''
];
ExecStartPost = [
''-${ip-n config} link set dev lo up''
];
ExecStop = [
''${ip} netns delete ${escapeSystemdExecArg config.name}''
];
@ -420,6 +423,10 @@
type = bool;
default = false;
};
privateMounts = mkOption {
type = bool;
default = true;
};
name = mkOption {
type = nullOr str;
default = null;
@ -456,6 +463,7 @@
];
serviceConfig = {
NetworkNamespacePath = mkOptionDefault cfg.path;
PrivateMounts = mkIf (!cfg.privateMounts) (mkDefault false);
BindReadOnlyPaths = mkIf (cfg.bindResolvConf != null) [
"${cfg.bindResolvConf}:/etc/resolv.conf"
];