working ollama

This commit is contained in:
Chris Cochrun 2024-12-18 14:17:25 -06:00
parent 3dc78b4d16
commit 068b1e79d5
6 changed files with 48 additions and 22 deletions

View file

@ -12,15 +12,16 @@
]
},
"locked": {
"lastModified": 1719830626,
"narHash": "sha256-7Wb2KiImYxrrIehtodNG9IvumFtZ2f5DkhrjnUBe7zk=",
"lastModified": 1734005403,
"narHash": "sha256-vgh3TqfkFdnPxREBedw4MQehIDc3N8YyxBOB45n+AvU=",
"owner": "erikarvstedt",
"repo": "extra-container",
"rev": "37b479006a80a936ac17e82fb2e8c07b822e17f2",
"rev": "f4de6c329b306a9d3a9798a30e060c166f781baa",
"type": "github"
},
"original": {
"owner": "erikarvstedt",
"ref": "0.13",
"repo": "extra-container",
"type": "github"
}
@ -30,11 +31,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@ -72,11 +73,11 @@
"nixpkgs-unstable": "nixpkgs-unstable"
},
"locked": {
"lastModified": 1720159196,
"narHash": "sha256-FrO4fgh+NRhUg/B80pzyz45vco4/OskHe1u8+IREPmc=",
"lastModified": 1734508046,
"narHash": "sha256-JN/PFBOVqWKc76zSdOunYoG5Q0m8W4zfrEh3V4EOIuk=",
"owner": "fort-nix",
"repo": "nix-bitcoin",
"rev": "32f72e8f0e7ef780f3d753f56c4b94f1f5106a00",
"rev": "33dbb41d581b86decf421cb3835c426d557e0e9c",
"type": "github"
},
"original": {
@ -88,27 +89,27 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1719957072,
"narHash": "sha256-gvFhEf5nszouwLAkT9nWsDzocUTqLWHuL++dvNjMp9I=",
"lastModified": 1734323986,
"narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7144d6241f02d171d25fba3edeaf15e0f2592105",
"rev": "394571358ce82dff7411395829aa6a3aad45b907",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1720027103,
"narHash": "sha256-Q92DHQjIvaMLpawMdXnbKQjCkzAWqjhjWJYS5RcKujY=",
"lastModified": 1734126203,
"narHash": "sha256-0XovF7BYP50rTD2v4r55tR5MuBLet7q4xIz6Rgh3BBU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "61684d356e41c97f80087e89659283d00fe032ab",
"rev": "71a6392e367b08525ee710a93af2e80083b5b3e2",
"type": "github"
},
"original": {
@ -120,11 +121,11 @@
},
"nixpkgs-unstable_2": {
"locked": {
"lastModified": 1720957393,
"narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=",
"lastModified": 1734424634,
"narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "693bc46d169f5af9c992095736e82c3488bf7dbb",
"rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33",
"type": "github"
},
"original": {

View file

@ -26,6 +26,7 @@
unstable = import nixpkgs-unstable {
inherit system;
config = { allowUnfree = true; };
overlays = [ (import ./python312overlay.nix) ];
};
in {

View file

@ -7,7 +7,6 @@ with lib;
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
nix = {
extraOptions = "experimental-features = nix-command flakes";
# package = pkgs.nixFlakes;
@ -18,6 +17,13 @@ with lib;
};
settings = {
auto-optimise-store = true;
substituters = [
"https://nix-community.cachix.org"
"https://cache.nixos.org/"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
};
# nixpkgs.config.allowUnFree = true;

View file

@ -5,14 +5,25 @@ with lib;
services = {
ollama = {
enable = true;
package = unstable.ollama;
# package = unstable.ollama;
# port = 11434;
acceleration = "cuda";
};
open-webui = {
enable = true;
port = 3082;
package = unstable.open-webui;
host = "0.0.0.0";
package = unstable.open-webui.overrideAttrs {
pytestCheckPhase = false;
doCheck = false;
doInstallCheck = false;
nativeCheckInputs = [];
pythonImportsCheck = [];
passthru = {};
disabledTests = [
"async"
];
};
};
};
}

View file

@ -10,4 +10,5 @@ self: super: {
];
};
};
in super.python312.override {inherit packageOverrides;};
}

View file

@ -317,6 +317,12 @@
reverse_proxy 127.0.0.1:11434
'';
};
virtualHosts = {
"chatai.tfcconnection.org".extraConfig = ''
encode gzip
reverse_proxy 127.0.0.1:3082
'';
};
virtualHosts = {
"api.tfcconnection.org".extraConfig = ''
encode gzip