diff --git a/hosts/home-pc.nix b/hosts/home-pc.nix index de48f35..2458661 100644 --- a/hosts/home-pc.nix +++ b/hosts/home-pc.nix @@ -19,6 +19,7 @@ ../services/samba/home-pc.nix ../services/restic/home-pc.nix ../services/pcscd.nix + ../services/open-webui.nix ]; nixpkgs.config.allowUnfree = true; diff --git a/services/open-webui.nix b/services/open-webui.nix index eb659c7..67794c8 100644 --- a/services/open-webui.nix +++ b/services/open-webui.nix @@ -1,9 +1,36 @@ -{ pkgs, ... }: +{ + config, + inputs, + pkgs, + ... +}: { + disabledModules = [ + "services/misc/ollama.nix" + "services/misc/open-webui.nix" + ]; + + imports = [ + "${inputs.nixpkgs-unstable}/nixos/modules/services/misc/ollama.nix" + "${inputs.nixpkgs-unstable}/nixos/modules/services/misc/open-webui.nix" + ]; + + services.ollama = { + enable = true; + package = pkgs.unstable.ollama; + acceleration = "rocm"; + rocmOverrideGfx = "10.3.1"; + }; + services.open-webui = { enable = true; package = pkgs.unstable.open-webui; + host = "0.0.0.0"; port = 11111; + environment = { + WEBUI_AUTH = "False"; + OLLAMA_API_BASE_URL = "http://127.0.0.1:${toString config.services.ollama.port}"; + }; }; }