nixosModules: remove ollama module

This commit is contained in:
Aly Raffauf 2024-06-30 23:01:57 -04:00
parent 74157fbdc2
commit 931c929fe9
5 changed files with 10 additions and 48 deletions

View file

@ -20,6 +20,11 @@
networking.hostName = "mandarin"; networking.hostName = "mandarin";
services.ollama = {
enable = true;
acceleration = "rocm";
};
system.stateVersion = "24.05"; system.stateVersion = "24.05";
ar = { ar = {
@ -48,12 +53,6 @@
services = { services = {
flatpak.enable = true; flatpak.enable = true;
ollama = {
enable = true;
gpu = "amd";
};
tailscale.enable = true; tailscale.enable = true;
}; };

View file

@ -167,6 +167,11 @@ in {
secretKeyFile = "/var/cache-priv-key.pem"; secretKeyFile = "/var/cache-priv-key.pem";
}; };
ollama = {
enable = true;
acceleration = "rocm";
};
samba = { samba = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;
@ -253,12 +258,6 @@ in {
}; };
services = { services = {
ollama = {
enable = true;
gpu = "amd";
listenAddress = "0.0.0.0:11434";
};
syncthing = { syncthing = {
enable = true; enable = true;
syncMusic = true; syncMusic = true;

View file

@ -189,22 +189,6 @@
services = { services = {
flatpak.enable = lib.mkEnableOption "Flatpak support with GUI."; flatpak.enable = lib.mkEnableOption "Flatpak support with GUI.";
ollama = {
enable = lib.mkEnableOption "Ollama interface for LLMs.";
listenAddress = lib.mkOption {
description = "Listen Address for Ollama.";
default = "127.0.0.1:11434";
type = lib.types.str;
};
gpu = lib.mkOption {
description = "Type of GPU for enabling GPU acceleration.";
default = null;
type = lib.types.str;
};
};
syncthing = { syncthing = {
enable = lib.mkEnableOption "Syncthing sync service."; enable = lib.mkEnableOption "Syncthing sync service.";

View file

@ -6,7 +6,6 @@
}: { }: {
imports = [ imports = [
./flatpak ./flatpak
./ollama
./syncthing ./syncthing
./tailscale ./tailscale
]; ];

View file

@ -1,19 +0,0 @@
{
pkgs,
lib,
config,
...
}: {
config = lib.mkIf config.ar.services.ollama.enable {
services.ollama = {
enable = true;
acceleration =
if config.ar.services.ollama.gpu == "amd"
then "rocm"
else if config.ar.services.ollama.gpu == "nvidia"
then "cuda"
else null;
listenAddress = config.ar.services.ollama.listenAddress;
};
};
}