diff --git a/nixos/modules/config/malloc.nix b/nixos/modules/config/malloc.nix index dfa86a44a326..65130454735c 100644 --- a/nixos/modules/config/malloc.nix +++ b/nixos/modules/config/malloc.nix @@ -79,19 +79,13 @@ in and/or service failure. - - - - Changing this option does not affect the current session. - - ''; }; }; 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} + ''; }; }