feat: Added ollama for local machine

This commit is contained in:
uttarayan21
2025-02-05 22:11:34 +05:30
parent 9d78187a13
commit 47724c5844
6 changed files with 40 additions and 4 deletions

View File

@@ -38,6 +38,14 @@
builders-use-substitutes = true
secret-key-files = ${config.sops.secrets."builder/mirai/cache/private".path}
'';
substituters = [
"https://nix-community.cachix.org"
# "https://sh.darksailor.dev"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
# "mirai:bcVPoFGBZ0i7JAKMXIqLj2GY3CulLC4kP7rQyqes1RM="
];
gc = {
automatic = true;
dates = "daily";

View File

@@ -52,8 +52,14 @@
auto-optimise-store = true;
extra-experimental-features = "nix-command flakes auto-allocate-uids";
trusted-users = ["root" "servius"];
#substituters = ["https://sh.darksailor.dev"];
trusted-public-keys = ["mirai:bcVPoFGBZ0i7JAKMXIqLj2GY3CulLC4kP7rQyqes1RM="];
substituters = [
"https://nix-community.cachix.org"
# "https://sh.darksailor.dev"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
# "mirai:bcVPoFGBZ0i7JAKMXIqLj2GY3CulLC4kP7rQyqes1RM="
];
};
extraOptions = ''
build-users-group = nixbld
@@ -246,6 +252,7 @@
# List packages installed in system profile. To search, run:
# $ nix search wget
systemPackages = with pkgs; [
nvtopPackages.nvidia
quickemu
(nixvim.makeNixvim (import ../../neovim))
qpwgraph

View File

@@ -2,6 +2,7 @@
imports = [
./samba.nix
./sunshine.nix
./ollama.nix
];
services = {
hardware.openrgb.enable = true;

View File

@@ -0,0 +1,19 @@
{pkgs, ...}: {
services = {
ollama = {
enable = true;
host = "127.0.0.1";
port = 11434;
package = pkgs.ollama-cuda;
};
open-webui = {
enable = true;
environment = {
"OLLAMA_API_BASE_URL" = "http://127.0.0.1:11434/api";
"OLLAMA_BASE_URL" = "http://127.0.0.1:11434";
WEBUI_AUTH = "False";
ENABLE_LOGIN_FORM = "False";
};
};
};
}