From d3e15cd7b18da416ea54c999cb6b49f280462adf Mon Sep 17 00:00:00 2001 From: David Wronek Date: Wed, 11 Mar 2026 12:17:39 +0100 Subject: [PATCH] nixos/esphome: add state directory to ExecPaths= and ReadWritePaths= Fixes the following issue: ``` sh: line 1: /var/lib/esphome/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-g++: Permission denied ``` Signed-off-by: David Wronek --- nixos/modules/services/home-automation/esphome.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/home-automation/esphome.nix b/nixos/modules/services/home-automation/esphome.nix index 589c566174b5..7dc8de0f531e 100644 --- a/nixos/modules/services/home-automation/esphome.nix +++ b/nixos/modules/services/home-automation/esphome.nix @@ -131,6 +131,8 @@ in RuntimeDirectory = mkIf cfg.enableUnixSocket "esphome"; RuntimeDirectoryMode = "0750"; EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile; + ExecPaths = "%S/${stateDir}"; + ReadWritePaths = "%S/${stateDir}"; # Hardening CapabilityBoundingSet = "";