From 38b56a787723eb2173a7a48aa7b5d1d3ad71e84b Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 4 Oct 2026 03:59:50 +0200 Subject: [PATCH] node-env: the account's environment as one module's two files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every module contributes variables and PATH entries as facts, and one holder of node-environment places them (novox/hq ADR 0203, to-be 41 WP3). This is that holder: no package, no process, no tools — the directories it owns under the home and two files the controller fills, the POSIX file at the path the seat fixes (~/.config/mesh/environment.sh, sourced by the login shell) and environment.d's 50-mesh.conf for the account's service manager and graphical session. --- modules/node-env/module.json | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 modules/node-env/module.json diff --git a/modules/node-env/module.json b/modules/node-env/module.json new file mode 100644 index 0000000..43b27e8 --- /dev/null +++ b/modules/node-env/module.json @@ -0,0 +1,42 @@ +{ + "module": "node-env", + "version": "1", + "claims": [ + { + "name": "node-environment", + "scope": "node" + } + ], + "resources": [ + { + "id": "mesh-config-dir", + "type": "directory", + "path": "${machine:account-home}/.config/mesh", + "owner": "${machine:account}", + "mode": "0755" + }, + { + "id": "environment-d", + "type": "directory", + "path": "${machine:account-home}/.config/environment.d", + "owner": "${machine:account}", + "mode": "0755" + }, + { + "id": "posix", + "type": "file", + "path": "${machine:account-home}/.config/mesh/environment.sh", + "owner": "${machine:account}", + "mode": "0644", + "content": "# The operator account's environment, generated by the mesh (module node-env, novox/hq ADR 0203).\n# Do not edit: this file is replaced at every push. Every line names the module that contributed it.\n# Sourced by the login shell from its always-read startup file (for zsh, ~/.zshenv), so a script, a\n# login and the shell's execute verb all see it. Your own variables belong in your shell's own lines.\n${environment:posix}" + }, + { + "id": "systemd", + "type": "file", + "path": "${machine:account-home}/.config/environment.d/50-mesh.conf", + "owner": "${machine:account}", + "mode": "0644", + "content": "# The operator account's environment for its service manager and graphical session, generated by\n# the mesh (module node-env, novox/hq ADR 0203). Do not edit: this file is replaced at every push.\n# The same facts as ~/.config/mesh/environment.sh, in environment.d(5) syntax.\n${environment:systemd}" + } + ] +}