diff --git a/devices/pc/default.nix b/devices/pc/default.nix index 7a066b23..7a3373bb 100644 --- a/devices/pc/default.nix +++ b/devices/pc/default.nix @@ -146,6 +146,7 @@ inputs: memoryMB = 90112; gpus."4060" = 1; }; + ollama = {}; }; bugs = [ "xmunet" "backlight" "amdpstate" ]; }; diff --git a/modules/services/ollama.nix b/modules/services/ollama.nix new file mode 100644 index 00000000..82344969 --- /dev/null +++ b/modules/services/ollama.nix @@ -0,0 +1,16 @@ +inputs: +{ + options.nixos.services.ollama = let inherit (inputs.lib) mkOption types; in mkOption + { type = types.nullOr (types.submodule {}); default = null; }; + config = let inherit (inputs.config.nixos.services) ollama; in inputs.lib.mkIf (ollama != null) + { + services = + { + ollama.enable = true; + open-webui = + { enable = true; package = inputs.pkgs.genericPackages.open-webui; environment.WEBUI_AUTH = "False"; }; + nextjs-ollama-llm-ui.enable = true; + }; + nixos.packages._packages = [ inputs.pkgs.oterm ]; + }; +}