From 199b4c47434aecea7aa56edb82879327df228b23 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Wed, 5 Dec 2018 04:24:20 +0100 Subject: prometheus/exporters/tor: make CPython happy by defining $HOME --- nixos/modules/services/monitoring/prometheus/exporters/tor.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nixos/modules/services/monitoring/prometheus/exporters') diff --git a/nixos/modules/services/monitoring/prometheus/exporters/tor.nix b/nixos/modules/services/monitoring/prometheus/exporters/tor.nix index 0e2a13c44ab7..e0ae83802425 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/tor.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/tor.nix @@ -36,5 +36,10 @@ in ${concatStringsSep " \\\n " cfg.extraFlags} ''; }; + + # CPython requires a process to either have $HOME defined or run as a UID + # defined in /etc/passwd. The latter is false with DynamicUser, so define a + # dummy $HOME. https://bugs.python.org/issue10496 + environment = { HOME = "/var/empty"; }; }; } -- cgit 1.4.1