This commit is contained in:
Lilith 2025-04-25 11:32:52 +02:00
commit 8d34f9f622
Signed by: lilith
GPG key ID: 8712A0F317C37175
13 changed files with 135 additions and 62 deletions

View file

@ -1,8 +1,10 @@
{...}: {
{ ... }:
{
imports = [
./nfs.nix
./desktop.nix
./gaming.nix
./stylix.nix
./ollama.nix
];
}

View file

@ -0,0 +1,20 @@
{ config, lib, ... }:
{
options.ollama.enable = lib.mkEnableOption "Enable Ollama server /w GPU acceleration";
config.services.ollama = lib.mkIf config.ollama.enable {
enable = true;
host = "0.0.0.0";
acceleration = "rocm";
rocmOverrideGfx = "11.0.0";
};
config.networking.firewall = lib.mkIf config.ollama.enable { allowedTCPPorts = [ 11434 ]; };
config.environment.persistence."/persist/cache".directories = lib.mkIf config.ollama.enable [
{
directory = "/var/lib/private/ollama";
user = "nouser";
group = "nogroup";
mode = "u=rwx,g=,o=";
}
];
}