nix-configs/nixos-modules/docker-sonarr.nix
2024-10-02 18:12:17 -04:00

36 lines
852 B
Nix

{ pkgs, ... }:
{
virtualisation = {
containers.enable = true;
podman.enable = true;
oci-containers.containers = {
sonarr = {
image = "my-sonarr:latest";
imageFile = pkgs.dockerTools.buildImage {
name = "my-sonarr";
tag = "latest";
contents = [ pkgs.busybox ];
config.Cmd = [
"${pkgs.sonarr}/bin/NzbDrone"
"-nobrowser"
"-data=/config"
];
};
volumes = [
"sonarr-config:/config"
"/video-data:/data"
];
environment.TZ = "America/New_York";
labels = {
swag = "enable";
swag_url = "sonarr.icanttype.org";
swag_port = "8989";
};
extraOptions = [
"--pull=newer"
"--network=www"
];
};
};
};
}