better module

This commit is contained in:
Chris Dombroski 2024-09-07 19:23:41 -04:00
parent 0ac1fa9ed0
commit 554a906dbf

View file

@ -21,10 +21,10 @@ in
description = ''
Serial port for the Z-Wave controller.
Used for permissions only; must be additionally set in the application
'';
example = "/dev/ttyUSB0";
};
Used for permissions only; must be additionally set in the application
'';
example = "/dev/ttyUSB0";
};
};
config = mkIf cfg.enable {
assertions = [
@ -44,7 +44,10 @@ in
RuntimeDirectory = "zwave-js-ui";
StateDirectory = "zwave-js-ui";
RootDirectory = "/run/zwave-js-ui";
BindReadOnlyPaths = [ "/etc" "/nix/store" ];
BindReadOnlyPaths = [
"/etc"
"/nix/store"
];
BindPaths = [ "/var/lib/zwave-js-ui" ];
DeviceAllow = [ cfg.serialPort ];
DynamicUser = true;