feat(host/faunus-ater): replace mealie container with systemd service

This commit is contained in:
Malte Tammena 2024-11-21 09:36:39 +01:00
parent 08063c780c
commit 3805e0c9a5

View file

@ -3,29 +3,17 @@
config,
...
}: {
virtualisation.oci-containers.containers."mealie" = {
image = "ghcr.io/mealie-recipes/mealie:v1.0.0-RC2";
ports = let port = builtins.toString config.state.services.eat.port; in ["${port}:${port}"];
environment = {
PUID = builtins.toString config.users.users.mealie.uid;
PGID = builtins.toString config.users.groups.mealie.gid;
services.mealie = {
enable = true;
listenAddress = "127.0.0.1";
port = config.state.services.eat.port;
settings = {
ALLOW_SIGNUP = "false";
TZ = "Europe/Berlin";
BASE_URL = "https://eat.tammena.me";
TOKEN_TIME = "8760";
};
volumes = [
"/data/dirty/mealie:/app/data"
];
};
# Create user and group for the data
users.users.mealie = {
isSystemUser = true;
group = "mealie";
};
users.groups.mealie = {};
# Configure nginx reverse proxy
services.nginx.virtualHosts."eat.tammena.me" = {
addSSL = true;
@ -44,8 +32,10 @@
};
# Secrets
sops.secrets."certificate-key-eat-tammena-me" = {
owner = config.users.users.nginx.name;
mode = "0400";
sops.secrets = {
"certificate-key-eat-tammena-me" = {
owner = config.users.users.nginx.name;
mode = "0400";
};
};
}