From be8660d37264f9af07971599344eac47433c0d5b Mon Sep 17 00:00:00 2001 From: TheWanderingCrow Date: Fri, 28 Feb 2025 16:31:25 -0500 Subject: [PATCH] test openhab podman --- modules/users/overseer/services/openhab.nix | 32 +++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 modules/users/overseer/services/openhab.nix diff --git a/modules/users/overseer/services/openhab.nix b/modules/users/overseer/services/openhab.nix new file mode 100644 index 0000000..8c0c3fa --- /dev/null +++ b/modules/users/overseer/services/openhab.nix @@ -0,0 +1,32 @@ +let + volumePath = "/overseer/services"; +in + { + lib, + config, + ... + }: + lib.mkIf config.user.overseer.enable { + systemd.tmpfiles.rules = [ + "d ${volumePath}/openhab" + "d ${volumePath}/openhab/conf" + "d ${volumePath}/openhab/userdata" + "d ${volumePath}/openhab/addons" + ]; + ########### + # Service # + ########### + + virtualisation.oci-containers = { + backend = "podman"; + containers."openhab" = { + image = "openhab/openhab:5.0.0.M1"; + user = "openhab:openhab"; + volumes = [ + "${volumePath}/openhab/conf:/openhab/conf" + "${volumePath}/openhab/userdata:/openhab/userdata" + "${volumePath}/openhab/addons:/openhab/addons" + ]; + }; + }; + }