Skip to content

nixos/esphome: add environment options and fix permission denied error - #498811

Merged
SuperSandro2000 merged 3 commits into
NixOS:masterfrom
ungeskriptet:esphome-env
Apr 9, 2026
Merged

SuperSandro2000 merged 3 commits into
NixOS:masterfrom
ungeskriptet:esphome-env

Conversation

@ungeskriptet

@ungeskriptet ungeskriptet commented Mar 11, 2026 •

Copy link
Copy Markdown
Member

These commits introduce two new options:

  • services.esphome.environment
  • services.esphome.environmentFile

These options can be used to set a password for the dashboard.

This change also fixes a permission denied error during firmware compilation by setting ExecPaths= and ReadWritePaths= to the state directory. (#339557 (comment))

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

This will allow users to easily set secrets and other environment
variables.

Signed-off-by: David Wronek <[email protected]>
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Mar 11, 2026
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 <[email protected]>
@ungeskriptet
ungeskriptet requested a review from oddlama March 11, 2026 12:15
@nixpkgs-ci nixpkgs-ci Bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Mar 11, 2026
@SuperSandro2000

Copy link
Copy Markdown
Member

I think the permission denied error is the second part of #504950

For the import error I will create another PR in a minute.

@SuperSandro2000
SuperSandro2000 added this pull request to the merge queue Apr 9, 2026
Merged via the queue into NixOS:master with commit 4697f4c Apr 9, 2026
29 of 31 checks passed
@ungeskriptet
ungeskriptet deleted the esphome-env branch April 26, 2026 08:12
@ungeskriptet ungeskriptet mentioned this pull request Apr 26, 2026
3 of 13 tasks
oddlama pushed a commit that referenced this pull request Apr 27, 2026
It looks like ExecPaths was removed in #508178, after adding it in #498811.
ExecPaths is required to fix building firmware for LibreTiny-based
devices, otherwise we get the following error:
```
sh: line 1: /var/lib/esphome/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-g++: Permission denied
```

Signed-off-by: David Wronek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants