From d581b6228b687bd0c0e3d677fcc13abf7e2ab3be Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Mon, 23 Dec 2024 17:42:04 +0100 Subject: [PATCH] Use NixNG to build Bazarr --- README.md | 2 +- flake.lock | 6 +++--- modules/media.nix | 2 +- nixng-configurations/bazarr.nix | 9 +++++++++ nixng-configurations/default.nix | 1 + 5 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 nixng-configurations/bazarr.nix diff --git a/README.md b/README.md index 472288f..58459ce 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,10 @@ Legend: | ✨ | `nixng-jellyseerr` | | | ✨ | `nixng-radarr` | | | ✨ | `nixng-sonarr` | | +| ✨ | `nixng-bazarr` | | | ✅ | `jellyfin/jellyfin` | | | ✅ | `linuxserver/deluge` | | | ✅ | `lscr.io/linuxserver/prowlarr` | | -| ✅ | `lscr.io/linuxserver/bazarr` | | | ✅ | `ghcr.io/atuinsh/atuin` | | | ✅ | `postgres:14` | Database for Atuin | | ✅ | `ghcr.io/paperless-ngx/paperless-ngx` | | diff --git a/flake.lock b/flake.lock index 74e51b0..7fe6ab5 100644 --- a/flake.lock +++ b/flake.lock @@ -676,11 +676,11 @@ "treefmt-nix": "treefmt-nix_2" }, "locked": { - "lastModified": 1734963444, - "narHash": "sha256-uxPuuRnW0O8SC0IGo9jY+x3ghfSEfFcaSAVFb1ZxlWo=", + "lastModified": 1734971171, + "narHash": "sha256-4PEQpCiLiHPnbEWpP2e2QoxUzqe9PXgJyU2FWIXfAB8=", "owner": "pizzapim", "repo": "NixNG", - "rev": "a16aa49f49eb559742ff71ad30cfa9985e2223df", + "rev": "8791c628410bc5feb2b9052877b7a67cc089e47e", "type": "github" }, "original": { diff --git a/modules/media.nix b/modules/media.nix index af9d6e6..77fc2a3 100644 --- a/modules/media.nix +++ b/modules/media.nix @@ -383,7 +383,7 @@ spec = { containers.bazarr = { - image = globals.images.bazarr; + image = utils.mkNixNGImage "bazarr"; ports.web.containerPort = 6767; imagePullPolicy = "IfNotPresent"; diff --git a/nixng-configurations/bazarr.nix b/nixng-configurations/bazarr.nix new file mode 100644 index 0000000..03d7b6a --- /dev/null +++ b/nixng-configurations/bazarr.nix @@ -0,0 +1,9 @@ +{...}: { + dinit.enable = true; + init.services.bazarr.shutdownOnExit = true; + + services.bazarr = { + enable = true; + configDir = "/config"; + }; +} diff --git a/nixng-configurations/default.nix b/nixng-configurations/default.nix index b6f4549..157f36a 100644 --- a/nixng-configurations/default.nix +++ b/nixng-configurations/default.nix @@ -15,6 +15,7 @@ flake-utils.lib.eachDefaultSystem (system: let jellyseerr = ./jellyseerr.nix; radarr = ./radarr.nix; sonarr = ./sonarr.nix; + bazarr = ./bazarr.nix; }; in { nixngConfigurations = builtins.mapAttrs (name: configFile: