dotfiles.nix/nixos/viridian/containers/homarr.nix

45 lines
975 B
Nix
Raw Normal View History

2023-11-18 21:04:09 +08:00
{ ... }:
{
virtualisation.oci-containers.containers = {
2024-01-23 09:45:42 +08:00
homarr = {
2023-11-18 21:04:09 +08:00
autoStart = true;
image = "ghcr.io/ajnart/homarr:latest";
ports = [
"7575:7575/tcp" # WebUI
];
volumes = [
# Container data
2024-01-23 09:45:42 +08:00
"/srv/containers/homarr/configs:/app/data/configs:rw"
"/srv/containers/homarr/icons:/app/public/icons:rw"
"/srv/containers/homarr/data:/data:rw"
2023-11-18 21:04:09 +08:00
# Docker Integration
"/var/run/docker.sock:/var/run/docker.sock:ro"
];
extraOptions = [
"--network=host"
];
};
};
services.traefik.dynamicConfigOptions.http.routers = {
homarr = {
rule = "Host(`kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"admin"
];
service = "homarr";
};
};
services.traefik.dynamicConfigOptions.http.services = {
homarr.loadBalancer.servers = [
{ url = "http://192.168.1.102:7575"; }
];
};
2023-11-18 21:04:09 +08:00
}