nix-configs/nixos-modules/docker-calibre-web.nix
2024-10-24 12:45:09 -04:00

37 lines
930 B
Nix

{ pkgs, ... }:
{
virtualisation = {
containers.enable = true;
podman.enable = true;
oci-containers.containers = {
calibre-web = {
image = "my-calibre-web:latest";
imageFile = pkgs.dockerTools.buildLayeredImage {
name = "my-calibre-web";
tag = "latest";
contents = [ pkgs.busybox ];
config.Cmd = [
"${pkgs.calibre-web}/bin/calibre-web"
"-p"
"/config/app.db"
"-g"
"/config/gdrive.db"
"-i"
"0.0.0.0"
];
};
volumes = [
"calibre-web-config:/config"
"/video-data:/data"
];
environment.TZ = "America/New_York";
labels = {
swag = "enable";
swag_url = "calibre-web.icanttype.org";
swag_port = "8083";
};
extraOptions = [ "--network=www" ];
};
};
};
}