diff options
author | Pierre Bourdon <delroth@gmail.com> | 2019-05-30 12:07:34 +0900 |
---|---|---|
committer | Pierre Bourdon <delroth@gmail.com> | 2019-05-30 12:07:34 +0900 |
commit | 9e60eab8f546a81feefe32d2ebf03420131f04e6 (patch) | |
tree | 8ab41c0d44f87abc3dc31f15bdc58595a2ae0182 | |
parent | 4b428d8c09124b0672fc517ec799b31c996a5a66 (diff) |
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.
-rw-r--r-- | nixos/modules/config/malloc.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/modules/config/malloc.nix b/nixos/modules/config/malloc.nix index bc51b9fc573a8..dfa86a44a3260 100644 --- a/nixos/modules/config/malloc.nix +++ b/nixos/modules/config/malloc.nix @@ -91,5 +91,7 @@ in config = mkIf (cfg.provider != "libc") { environment.variables.LD_PRELOAD = providerLibPath; + systemd.extraConfig = "DefaultEnvironment=\"LD_PRELOAD=${providerLibPath}\""; + systemd.user.extraConfig = "DefaultEnvironment=\"LD_PRELOAD=${providerLibPath}\""; }; } |