merge
This commit is contained in:
commit
8d34f9f622
13 changed files with 135 additions and 62 deletions
|
|
@ -1,8 +1,10 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./nfs.nix
|
||||
./desktop.nix
|
||||
./gaming.nix
|
||||
./stylix.nix
|
||||
./ollama.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
20
system/optional/ollama.nix
Normal file
20
system/optional/ollama.nix
Normal 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=";
|
||||
}
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue