nixos/malloc: apply allocator settings to systemd units
This uses systemd's system.conf/user.conf "DefaultEnvironment" feature to set the allocator's LD_PRELOAD near-globally.
This commit is contained in:
parent
4b428d8c09
commit
9e60eab8f5
|
@ -91,5 +91,7 @@ in
|
||||||
|
|
||||||
config = mkIf (cfg.provider != "libc") {
|
config = mkIf (cfg.provider != "libc") {
|
||||||
environment.variables.LD_PRELOAD = providerLibPath;
|
environment.variables.LD_PRELOAD = providerLibPath;
|
||||||
|
systemd.extraConfig = "DefaultEnvironment=\"LD_PRELOAD=${providerLibPath}\"";
|
||||||
|
systemd.user.extraConfig = "DefaultEnvironment=\"LD_PRELOAD=${providerLibPath}\"";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue