mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-02 10:14:09 +00:00
nixos/ollama: add openFirewall
option
This commit is contained in:
parent
d1e34f6138
commit
cb8670469b
@ -116,6 +116,14 @@ in
|
||||
Since `ollama run` is mostly a shell around the ollama server, this is usually sufficient.
|
||||
'';
|
||||
};
|
||||
openFirewall = lib.mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to open the firewall for ollama.
|
||||
This adds `services.ollama.port` to `networking.firewall.allowedTCPPorts`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -142,6 +150,8 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall = lib.mkIf cfg.openFirewall { allowedTCPPorts = [ cfg.port ]; };
|
||||
|
||||
environment.systemPackages = [ ollamaPackage ];
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user