diff --git a/aspects/hosts/_alexandria/open-webui.nix b/aspects/hosts/_alexandria/open-webui.nix new file mode 100644 index 0000000..fecab49 --- /dev/null +++ b/aspects/hosts/_alexandria/open-webui.nix @@ -0,0 +1,27 @@ +{ lib, config, inputs, ... }: +let + mkNginxVHosts = inputs.self.lib.mkNginxVHosts; +in +{ + nixpkgs.overlays = [ + (final: prev: { + open-webui = (import inputs.nixpkgs { + inherit (prev) system; + config.allowUnfree = true; + }).open-webui; + }) + ]; + + services.open-webui = { + enable = true; + environment = { + SCARF_NO_ANALYTICS = "True"; + DO_NOT_TRACK = "True"; + ANONYMIZED_TELEMETRY = "False"; + }; + }; + + services.nginx.virtualHosts = mkNginxVHosts { + domains."ai.baduhai.dev".locations."/".proxyPass = "http://127.0.0.1:8080/"; + }; +} diff --git a/data/services.nix b/data/services.nix index 180dd68..35cfeca 100644 --- a/data/services.nix +++ b/data/services.nix @@ -54,5 +54,10 @@ domain = "notes.baduhai.dev"; host = "alexandria"; } + { + name = "open-webui"; + domain = "ai.baduhai.dev"; + host = "alexandria"; + } ]; }