about summary refs log tree commit diff
path: root/nixos/modules/services/monitoring/prometheus/exporters
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2018-12-05 04:24:20 +0100
committerRobin Gloster <mail@glob.in>2018-12-05 11:26:38 +0100
commit199b4c47434aecea7aa56edb82879327df228b23 (patch)
treeee5f160ef16b658b8a9a45f48511a6a102b0100e /nixos/modules/services/monitoring/prometheus/exporters
parentcaaaaa7fbb58da7c4871ce03f79f15086ee9c4de (diff)
downloadnixlib-199b4c47434aecea7aa56edb82879327df228b23.tar
nixlib-199b4c47434aecea7aa56edb82879327df228b23.tar.gz
nixlib-199b4c47434aecea7aa56edb82879327df228b23.tar.bz2
nixlib-199b4c47434aecea7aa56edb82879327df228b23.tar.lz
nixlib-199b4c47434aecea7aa56edb82879327df228b23.tar.xz
nixlib-199b4c47434aecea7aa56edb82879327df228b23.tar.zst
nixlib-199b4c47434aecea7aa56edb82879327df228b23.zip
prometheus/exporters/tor: make CPython happy by defining $HOME
Diffstat (limited to 'nixos/modules/services/monitoring/prometheus/exporters')
-rw-r--r--nixos/modules/services/monitoring/prometheus/exporters/tor.nix5
1 files changed, 5 insertions, 0 deletions
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"; };
   };
 }