From b8da39f48155bd055252e3928c548c7775fab2cc Mon Sep 17 00:00:00 2001 From: Chris Dombroski Date: Wed, 2 Oct 2024 21:23:25 -0400 Subject: [PATCH] built sonarr --- nixos-modules/docker-calibre-web.nix | 4 +--- nixos-modules/docker-sonarr.nix | 27 +++++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/nixos-modules/docker-calibre-web.nix b/nixos-modules/docker-calibre-web.nix index e2ec520..1997b00 100644 --- a/nixos-modules/docker-calibre-web.nix +++ b/nixos-modules/docker-calibre-web.nix @@ -30,9 +30,7 @@ swag_url = "calibre-web.icanttype.org"; swag_port = "8083"; }; - extraOptions = [ - "--network=www" - ]; + extraOptions = [ "--network=www" ]; }; }; }; diff --git a/nixos-modules/docker-sonarr.nix b/nixos-modules/docker-sonarr.nix index 1668324..adfa858 100644 --- a/nixos-modules/docker-sonarr.nix +++ b/nixos-modules/docker-sonarr.nix @@ -1,16 +1,39 @@ +{ pkgs, ... }: { virtualisation = { containers.enable = true; podman.enable = true; oci-containers.containers = { sonarr = { - image = "lscr.io/linuxserver/sonarr:latest"; + image = "my-sonarr:latest"; + imageFile = pkgs.dockerTools.buildLayeredImage { + name = "my-sonarr"; + tag = "latest"; + contents = [ pkgs.busybox ]; + config = { + User = "911:911"; + Umask = "002"; + Cmd = [ + "${pkgs.sonarr}/bin/NzbDrone" + "-nobrowser" + "-data=/config" + ]; + Env = [ + "COMPlus_EnableDiagnostics=0" + "SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" + ]; + }; + }; volumes = [ "sonarr-config:/config" "/video-data:/data" ]; environment.TZ = "America/New_York"; - labels.swag = "enable"; + labels = { + swag = "enable"; + swag_url = "sonarr.icanttype.org"; + swag_port = "8989"; + }; extraOptions = [ "--pull=newer" "--network=www"