From 416432be17ac7fbfa59de6748f090a656fe453b1 Mon Sep 17 00:00:00 2001 From: ashisgreat22 Date: Tue, 17 Mar 2026 21:06:14 +0100 Subject: [PATCH] Fix OpenClaw systemd service configuration --- modules/openclaw.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openclaw.nix b/modules/openclaw.nix index 594bc0b..d143025 100644 --- a/modules/openclaw.nix +++ b/modules/openclaw.nix @@ -88,6 +88,8 @@ in "OPENCLAW_WORKSPACE_DIR=${workspaceDir}" ]; + EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile; + ExecStartPre = [ "${pkgs.coreutils}/bin/mkdir -p ${configDir} ${dataDir} ${workspaceDir}" "${pkgs.coreutils}/bin/cp -n /etc/openclaw/openclaw.json ${configDir}/ || true" @@ -104,8 +106,6 @@ in ReadWritePaths = [ configDir dataDir workspaceDir ]; NoNewPrivileges = true; }; - } // lib.optionalAttrs (cfg.environmentFile != null) { - serviceConfig.EnvironmentFile = cfg.environmentFile; }; }; }