Compare commits
No commits in common. "aea241d6103a3502dc57b7259439fb0295dbc416" and "a5e0b2b117d2244fcdcb88cd2d305dc2a31241b6" have entirely different histories.
aea241d610
...
a5e0b2b117
1 changed files with 17 additions and 7 deletions
|
|
@ -42,12 +42,6 @@ in
|
||||||
{
|
{
|
||||||
options.services.open-webui-oci = {
|
options.services.open-webui-oci = {
|
||||||
enable = mkEnableOption "Open WebUI container with Podman.";
|
enable = mkEnableOption "Open WebUI container with Podman.";
|
||||||
version = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "main";
|
|
||||||
example = "v0.8.5";
|
|
||||||
description = "Container version string.";
|
|
||||||
};
|
|
||||||
externalUrl = mkOption {
|
externalUrl = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
default = null;
|
default = null;
|
||||||
|
|
@ -93,7 +87,7 @@ in
|
||||||
virtualisation.oci-containers.backend = "podman";
|
virtualisation.oci-containers.backend = "podman";
|
||||||
|
|
||||||
virtualisation.oci-containers.containers."open-webui" = {
|
virtualisation.oci-containers.containers."open-webui" = {
|
||||||
image = "ghcr.io/open-webui/open-webui:${cfg.version}";
|
image = "ghcr.io/open-webui/open-webui:main";
|
||||||
environment =
|
environment =
|
||||||
defaultEnv
|
defaultEnv
|
||||||
// cfg.environment
|
// cfg.environment
|
||||||
|
|
@ -122,9 +116,11 @@ in
|
||||||
Restart = mkOverride 90 "always";
|
Restart = mkOverride 90 "always";
|
||||||
};
|
};
|
||||||
after = [
|
after = [
|
||||||
|
"podman-network-open-webui_default.service"
|
||||||
"podman-volume-open-webui_open-webui.service"
|
"podman-volume-open-webui_open-webui.service"
|
||||||
];
|
];
|
||||||
requires = [
|
requires = [
|
||||||
|
"podman-network-open-webui_default.service"
|
||||||
"podman-volume-open-webui_open-webui.service"
|
"podman-volume-open-webui_open-webui.service"
|
||||||
];
|
];
|
||||||
partOf = [
|
partOf = [
|
||||||
|
|
@ -135,6 +131,20 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services."podman-network-open-webui_default" = {
|
||||||
|
path = [ pkgs.podman ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = true;
|
||||||
|
ExecStop = "podman network rm -f open-webui_default";
|
||||||
|
};
|
||||||
|
script = ''
|
||||||
|
podman network inspect open-webui_default || podman network create open-webui_default
|
||||||
|
'';
|
||||||
|
partOf = [ "podman-compose-open-webui-root.target" ];
|
||||||
|
wantedBy = [ "podman-compose-open-webui-root.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
systemd.services."podman-volume-open-webui_open-webui" = {
|
systemd.services."podman-volume-open-webui_open-webui" = {
|
||||||
path = [ pkgs.podman ];
|
path = [ pkgs.podman ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue