Hello,
I am trying to setup zwave-js-ui. The software allows to set KEY_S0_Legacy key to be set using environment variables as mentioned here. I tried to set them up using systemd.environmentfile but they show up unpopulated in the web-ui.
Here is how i setup the config.
sops.secrets.zwave-js-ui-KEY_S0_Legacy = {};
sops.secrets.zwave-js-ui-KEY_S2_Unauthenticated = {};
sops.secrets.zwave-js-ui-KEY_S2_Authenticated = {};
sops.secrets.zwave-js-ui-KEY_S2_AccessControl = {};
sops.secrets.zwave-js-ui-KEY_LR_S2_Authenticated = {};
sops.secrets.zwave-js-ui-KEY_LR_S2_AccessControl = {};
sops.templates."zwave-js-ui-secrets.yaml".content = ''
KEY_S0_Legacy="${config.sops.placeholder.zwave-js-ui-KEY_S0_Legacy}"
KEY_S2_Unauthenticated="${config.sops.placeholder.zwave-js-ui-KEY_S2_Unauthenticated}"
KEY_S2_Authenticated="${config.sops.placeholder.zwave-js-ui-KEY_S2_Authenticated}"
KEY_S2_AccessControl="${config.sops.placeholder.zwave-js-ui-KEY_S2_AccessControl}"
KEY_LR_S2_Authenticated="${config.sops.placeholder.zwave-js-ui-KEY_LR_S2_Authenticated}"
KEY_LR_S2_AccessControl="${config.sops.placeholder.zwave-js-ui-KEY_LR_S2_AccessControl}"
'';
systemd.services.zwave-js-ui.serviceConfig.DynamicUser = lib.mkForce false;
sops.templates."zwave-js-ui-secrets.yaml".owner = "zwave-js-ui";
sops.templates."zwave-js-ui-secrets.yaml".group = "zwave-js-ui";
services.zwave-js-ui = {
enable = true;
serialPort = "/dev/serial/by-id/usb-Nabu_Casa_ZWA-2";
settings =
{
HOST = 127.0.0.1;
PORT = "8091";
};
};
systemd.services.zwave-js-ui.serviceConfig =
{
User = "zwave-js-ui";
Group = "zwave-js-ui";
EnvironmentFile=config.sops.templates."zwave-js-ui-secrets.yaml".path;
};
I can see the keys in the environmentfile,
ls -lad /run/secrets/rendered/zwave-js-ui-secrets.yaml
-r-------- 1 zwave-js-ui zwave-js-ui 337 Nov 2 08:25 /run/secrets/rendered/zwave-js-ui-secrets.yaml
Where did i go wrong?