open-webui-oci: replace version with image option
This commit is contained in:
parent
7b54ef433e
commit
9a400d96d1
4 changed files with 76 additions and 8 deletions
|
|
@ -8,6 +8,14 @@
|
|||
let
|
||||
cfg = config.services.open-webui-oci;
|
||||
|
||||
image = pkgs.dockerTools.pullImage {
|
||||
imageName = "ghcr.io/open-webui/open-webui";
|
||||
imageDigest = "sha256:2deb90b0423473d8f97febced2e62b8fd898aa3eb61877bb3aa336370214c258";
|
||||
hash = "sha256-2cdKfvZGUyPUm7TFXcf5OcG9ey4BvOZPUOVim1S2C+s=";
|
||||
finalImageName = "ghcr.io/open-webui/open-webui";
|
||||
finalImageTag = "0.8.5";
|
||||
};
|
||||
|
||||
defaultEnv = {
|
||||
ANONYMIZED_TELEMETRY = "False";
|
||||
BYPASS_MODEL_ACCESS_CONTROL = "True";
|
||||
|
|
@ -42,11 +50,10 @@ in
|
|||
{
|
||||
options.services.open-webui-oci = {
|
||||
enable = mkEnableOption "Open WebUI container with Podman.";
|
||||
version = mkOption {
|
||||
type = types.str;
|
||||
default = "main";
|
||||
example = "v0.8.5";
|
||||
description = "Container version string.";
|
||||
image = mkOption {
|
||||
type = types.package;
|
||||
default = image;
|
||||
description = "The Docker image to use (`pkgs.dockerTools.pullImage`).";
|
||||
};
|
||||
externalUrl = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
|
|
@ -93,7 +100,8 @@ in
|
|||
virtualisation.oci-containers.backend = "podman";
|
||||
|
||||
virtualisation.oci-containers.containers."open-webui" = {
|
||||
image = "ghcr.io/open-webui/open-webui:${cfg.version}";
|
||||
image = with cfg.image; imageName + ":" + imageTag;
|
||||
imageFile = cfg.image;
|
||||
environment =
|
||||
defaultEnv
|
||||
// cfg.environment
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue