task | first pass at moving things to modules dir
This commit is contained in:
parent
b0809fabb4
commit
1fd2ccdf02
2 changed files with 6 additions and 0 deletions
6
modules/default.nix
Normal file
6
modules/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }: {
|
||||
imports = [
|
||||
# ./beszel-agent.nix
|
||||
./ollama.nix
|
||||
];
|
||||
}
|
||||
20
modules/ollama.nix
Normal file
20
modules/ollama.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.ollama;
|
||||
in {
|
||||
options.ollama = {enable = mkEnableOption "is ollama host";};
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.vscode pkgs.nodejs ];
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
package = pkgs.ollama-rocm;
|
||||
# Optional: preload models, see https://ollama.com/library
|
||||
loadModels = ["qwen2.5-coder" "deepseek-r1"];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue