feat(nix): add nix-auth and update flake-utils dependencies

This commit is contained in:
uttarayan21
2025-10-30 22:37:43 +05:30
parent e68b9ca00a
commit 64380acf01
8 changed files with 132 additions and 63 deletions

View File

@@ -46,8 +46,12 @@
trusted-substituters = [
"https://nix-community.cachix.org"
"https://nixos-raspberrypi.cachix.org"
"https://llama-cpp.cachix.org"
"https://cuda-maintainers.cachix.org"
];
trusted-public-keys = [
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
"llama-cpp.cachix.org-1:H75X+w83wUKTIPSO1KWy9ADUrzThyGs8P5tmAbkWhQc="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixos-raspberrypi.cachix.org-1:4iMO9LXa8BqhU+Rpg6LQKiGa2lsNh/j2oiYLNOQ5sPI="
];

View File

@@ -5,7 +5,7 @@
# ./zerotier.nix
# ./dnscrypt.nix
./ollama.nix
./llama.nix
# ./llama.nix
./tailscale.nix
./samba.nix
./mullvad.nix

View File

@@ -1,13 +1,11 @@
{
inputs,
pkgs,
lib,
config,
...
}: {
services = {
llama-cpp = {
enable = false;
enable = true;
port = 11435;
model = pkgs.fetchurl {
url = "https://huggingface.co/lmstudio-community/gpt-oss-20b-GGUF/resolve/main/gpt-oss-20b-MXFP4.gguf";
@@ -15,6 +13,9 @@
};
# package = pkgs.ik_llama;
};
ollama = {
enable = true;
};
caddy = {
virtualHosts."llama.ryu.darksailor.dev".extraConfig = ''
import hetzner
@@ -22,4 +23,7 @@
'';
};
};
# environment.systemPackages = with pkgs; [
# vllm
# ];
}

View File

@@ -6,9 +6,10 @@
}: {
services = {
ollama = {
enable = false;
enable = true;
host = "0.0.0.0";
# loadModels = ["deepseek-r1:7b" "deepseek-r1:14b" "RobinBially/nomic-embed-text-8k" "qwen3:8b" "qwen3:14b"];
# loadModels = ["deepseek-r1:7b" "deepseek-r1:14b" "RobinBially/nomic-embed-text-8k" "qwen3:8b" "qwen3:14b"];
port = 11434;
acceleration = "cuda";
environmentVariables = {
@@ -17,18 +18,18 @@
LD_LIBRARY_PATH = "run/opengl-driver/lib";
HTTP_PROXY = "https://ollama.ryu.darksailor.dev";
};
package = pkgs.ollama.overrideAttrs {
version = "0.11.0";
src = pkgs.fetchFromGitHub {
owner = "ollama";
repo = "ollama";
tag = "v0.11.0";
hash = "sha256-po7BxJAj9eOpOaXsLDmw6/1RyjXPtXza0YUv0pVojZ0=";
fetchSubmodules = true;
};
doCheck = false;
vendorHash = "sha256-SlaDsu001TUW+t9WRp7LqxUSQSGDF1Lqu9M1bgILoX4=";
};
# package = pkgs.ollama.overrideAttrs {
# version = "0.11.0";
# src = pkgs.fetchFromGitHub {
# owner = "ollama";
# repo = "ollama";
# tag = "v0.11.0";
# hash = "sha256-po7BxJAj9eOpOaXsLDmw6/1RyjXPtXza0YUv0pVojZ0=";
# fetchSubmodules = true;
# };
# doCheck = false;
# vendorHash = "sha256-SlaDsu001TUW+t9WRp7LqxUSQSGDF1Lqu9M1bgILoX4=";
# };
};
# open-webui = {
# enable = false;