Don't error if octoprint is disabled for testing

This commit is contained in:
Sandro - 2022-08-21 22:10:01 +02:00
parent 72c8847075
commit 398133fa93
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 13 additions and 9 deletions

View File

@ -83,15 +83,19 @@
RestartSec = "1s";
};
users.users = {
# Allow access to printer serial port and GPIO
"${config.services.octoprint.user}".extraGroups = [ "dialout" ];
# Allow gpio group to access GPIO devices
gpio = {
isNormalUser = true;
group = "gpio";
};
};
users.users = lib.mkMerge [
(lib.optionalAttrs config.services.octoprint.enable {
# Allow access to printer serial port and GPIO
"${config.services.octoprint.user}".extraGroups = [ "dialout" ];
})
{
# Allow gpio group to access GPIO devices
gpio = {
isNormalUser = true;
group = "gpio";
};
}
];
services = {
# Do not log to flash: