add deconz

This commit is contained in:
2023-12-10 18:05:49 +01:00
parent b330d4610e
commit 82bda66d24
7 changed files with 61 additions and 62 deletions

View File

@@ -0,0 +1,33 @@
{ config, pkgs, ... }: {
users.users.deconz = {
isSystemUser = true;
group = "omada";
home = "/var/lib/deconz";
createHome = true;
};
users.groups.omada = { };
# TODO: check if we can run docker service as other user than root
virtualisation = {
oci-containers.containers = {
deconz = {
autoStart = false;
image = "marthoc/deconz";
volumes = [
"/etc/localtime:/etc/localtime:ro"
"/var/lib/deconz:/root/.local/share/dresden-elektronik/deCONZ"
];
environment = {
DECONZ_DEVICE = "/dev/ttyACM0";
TZ = "Europe/Vienna";
};
extraOptions = [
"--network=server"
"--mac-address=1a:c4:04:6e:29:02"
"--device=/dev/ttyACM0"
"--hostname=deconz"
];
};
};
};
}