mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-07 22:11:45 +03:00
nixos/malloc: use ld preload
This is more robust than setting via environment variable, though it does come later in the load sequence. An added benefit is affecting the current session.
This commit is contained in:
parent
6a6d11565d
commit
44b6999614
@ -79,19 +79,13 @@ in
|
||||
and/or service failure.
|
||||
</para>
|
||||
</warning>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
Changing this option does not affect the current session.
|
||||
</para>
|
||||
</note>
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.provider != "libc") {
|
||||
environment.variables.LD_PRELOAD = providerLibPath;
|
||||
systemd.extraConfig = "DefaultEnvironment=\"LD_PRELOAD=${providerLibPath}\"";
|
||||
systemd.user.extraConfig = "DefaultEnvironment=\"LD_PRELOAD=${providerLibPath}\"";
|
||||
environment.etc."ld-nix.so.preload".text = ''
|
||||
${providerLibPath}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user