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

@@ -7,7 +7,7 @@
enable = true; enable = true;
theme = { theme = {
name = "catppuccin-mocha-mauve-standard+normal"; name = "catppuccin-mocha-mauve-standard+normal";
package = pkgs.adwaita-icon-theme; package = pkgs.catppuccinThemes.gtk;
# package = pkgs.catppuccin-gtk.override { # package = pkgs.catppuccin-gtk.override {
# variant = "mocha"; # variant = "mocha";
# size = "standard"; # size = "standard";
@@ -33,7 +33,7 @@
gtk4.extraConfig = {gtk-application-prefer-dark-theme = 1;}; gtk4.extraConfig = {gtk-application-prefer-dark-theme = 1;};
}; };
home.packages = [ home.packages = [
pkgs.catppuccinThemes.gtk # pkgs.catppuccinThemes.gtk
pkgs.catppuccinThemes.papirus-folders pkgs.catppuccinThemes.papirus-folders
]; ];
} }

View File

@@ -45,5 +45,6 @@ lib.attrsets.optionalAttrs device.hasGui {
via via
wl-clipboard wl-clipboard
zed-editor zed-editor
webcord
]; ];
} }

View File

@@ -38,6 +38,14 @@
builders-use-substitutes = true builders-use-substitutes = true
secret-key-files = ${config.sops.secrets."builder/mirai/cache/private".path} 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 = { gc = {
automatic = true; automatic = true;
dates = "daily"; dates = "daily";

View File

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

View File

@@ -2,6 +2,7 @@
imports = [ imports = [
./samba.nix ./samba.nix
./sunshine.nix ./sunshine.nix
./ollama.nix
]; ];
services = { services = {
hardware.openrgb.enable = true; 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";
};
};
};
}