1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-02 16:09:46 +01:00

provide RUNTIME_DIRECTORY manually if not given by systemd

This commit is contained in:
Peter Kling 2024-08-29 20:47:37 +02:00
parent 295a580ca7
commit 141a58f9cf

View file

@ -50,6 +50,7 @@ let
cat = "${pkgs.coreutils}/bin/cat";
curl = "${pkgs.curl}/bin/curl";
install = "${pkgs.coreutils}/bin/install";
mktemp = "${pkgs.coreutils}/bin/mktemp";
syncthing = "${pkgs.syncthing}/bin/syncthing";
copyKeys = pkgs.writers.writeBash "syncthing-copy-keys" ''
@ -67,6 +68,10 @@ let
'';
curlShellFunction = ''
# systemd sets and creates RUNTIME_DIRECTORY on Linux
# on Darwin, we create it manually via mktemp
RUNTIME_DIRECTORY="''${RUNTIME_DIRECTORY:=$(${mktemp} -d)}"
curl() {
# get the api key by parsing the config.xml
while