making ollama more reachable and adding comfyui

This commit is contained in:
Chris Cochrun 2025-04-03 13:51:16 -05:00
parent 068b1e79d5
commit dbf6566392
4 changed files with 208 additions and 27 deletions

View file

@ -44,6 +44,23 @@
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"id": "flake-utils",
"type": "indirect"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -51,11 +68,11 @@
]
},
"locked": {
"lastModified": 1734366194,
"narHash": "sha256-vykpJ1xsdkv0j8WOVXrRFHUAdp9NXHpxdnn1F4pYgSw=",
"lastModified": 1742655702,
"narHash": "sha256-jbqlw4sPArFtNtA1s3kLg7/A4fzP4GLk9bGbtUJg0JQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "80b0fdf483c5d1cb75aaad909bd390d48673857f",
"rev": "0948aeedc296f964140d9429223c7e4a0702a1ff",
"type": "github"
},
"original": {
@ -73,11 +90,11 @@
"nixpkgs-unstable": "nixpkgs-unstable"
},
"locked": {
"lastModified": 1734508046,
"narHash": "sha256-JN/PFBOVqWKc76zSdOunYoG5Q0m8W4zfrEh3V4EOIuk=",
"lastModified": 1741725077,
"narHash": "sha256-p9mLfWb9PPLtRUKlJoQG71jFH6xU4Ox+rzPkExvAglY=",
"owner": "fort-nix",
"repo": "nix-bitcoin",
"rev": "33dbb41d581b86decf421cb3835c426d557e0e9c",
"rev": "875d25066d4ad4df2ced3a0a16be0e40bb469d95",
"type": "github"
},
"original": {
@ -87,13 +104,55 @@
"type": "github"
}
},
"nix-comfyui": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2",
"poetry2nix": "poetry2nix"
},
"locked": {
"lastModified": 1733961600,
"narHash": "sha256-kEM0Dck4K4dg9QYmdldy62av+XzsNz9XhfTAhtGWwzo=",
"owner": "dyscorv",
"repo": "nix-comfyui",
"rev": "cbd17e10b53dcf8fd9f5ba6f3c1ea1a550082659",
"type": "github"
},
"original": {
"owner": "dyscorv",
"repo": "nix-comfyui",
"type": "github"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
"nix-comfyui",
"poetry2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1729742964,
"narHash": "sha256-B4mzTcQ0FZHdpeWcpDYPERtyjJd/NIuaQ9+BV1h+MpA=",
"owner": "nix-community",
"repo": "nix-github-actions",
"rev": "e04df33f62cdcf93d73e9a04142464753a16db67",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-github-actions",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1734323986,
"narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=",
"lastModified": 1741600792,
"narHash": "sha256-yfDy6chHcM7pXpMF4wycuuV+ILSTG486Z/vLx/Bdi6Y=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "394571358ce82dff7411395829aa6a3aad45b907",
"rev": "ebe2788eafd539477f83775ef93c3c7e244421d3",
"type": "github"
},
"original": {
@ -105,11 +164,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1734126203,
"narHash": "sha256-0XovF7BYP50rTD2v4r55tR5MuBLet7q4xIz6Rgh3BBU=",
"lastModified": 1741678040,
"narHash": "sha256-rmBsz7BBcDwfvDkxnKHmolKceGJrr0nyz5PQYZg0kMk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "71a6392e367b08525ee710a93af2e80083b5b3e2",
"rev": "3ee8818da146871cd570b164fc4f438f78479a50",
"type": "github"
},
"original": {
@ -121,11 +180,11 @@
},
"nixpkgs-unstable_2": {
"locked": {
"lastModified": 1734424634,
"narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=",
"lastModified": 1742889210,
"narHash": "sha256-hw63HnwnqU3ZQfsMclLhMvOezpM7RSB0dMAtD5/sOiw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33",
"rev": "698214a32beb4f4c8e3942372c694f40848b360d",
"type": "github"
},
"original": {
@ -137,11 +196,25 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1734323986,
"narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=",
"lastModified": 1733749988,
"narHash": "sha256-+5qdtgXceqhK5ZR1YbP1fAUsweBIrhL38726oIEAtDs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "bc27f0fde01ce4e1bfec1ab122d72b7380278e68",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1742751704,
"narHash": "sha256-rBfc+H1dDBUQ2mgVITMGBPI1PGuCznf9rcWX/XIULyE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "394571358ce82dff7411395829aa6a3aad45b907",
"rev": "f0946fa5f1fb876a9dc2e1850d9d3a4e3f914092",
"type": "github"
},
"original": {
@ -151,11 +224,43 @@
"type": "github"
}
},
"poetry2nix": {
"inputs": {
"flake-utils": [
"nix-comfyui",
"flake-utils"
],
"nix-github-actions": "nix-github-actions",
"nixpkgs": [
"nix-comfyui",
"nixpkgs"
],
"systems": [
"nix-comfyui",
"flake-utils",
"systems"
],
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1731205797,
"narHash": "sha256-F7N1mxH1VrkVNHR3JGNMRvp9+98KYO4b832KS8Gl2xI=",
"owner": "nix-community",
"repo": "poetry2nix",
"rev": "f554d27c1544d9c56e5f1f8e2b8aff399803674e",
"type": "github"
},
"original": {
"id": "poetry2nix",
"type": "indirect"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nix-bitcoin": "nix-bitcoin",
"nixpkgs": "nixpkgs_2",
"nix-comfyui": "nix-comfyui",
"nixpkgs": "nixpkgs_3",
"nixpkgs-unstable": "nixpkgs-unstable_2"
}
},
@ -173,6 +278,43 @@
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"nix-comfyui",
"poetry2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1730120726,
"narHash": "sha256-LqHYIxMrl/1p3/kvm2ir925tZ8DkI0KA10djk8wecSk=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "9ef337e492a5555d8e17a51c911ff1f02635be15",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
}
},
"root": "root",

View file

@ -11,9 +11,15 @@
nix-bitcoin = {
url = "github:fort-nix/nix-bitcoin/release";
};
nix-comfyui.url = "github:dyscorv/nix-comfyui";
};
outputs = { nixpkgs, nixpkgs-unstable, home-manager, nix-bitcoin, ... }:
outputs = { nixpkgs,
nixpkgs-unstable,
home-manager,
nix-bitcoin,
nix-comfyui,
... }:
let
system = "x86_64-linux";
username = "chris";
@ -26,7 +32,10 @@
unstable = import nixpkgs-unstable {
inherit system;
config = { allowUnfree = true; };
overlays = [ (import ./python312overlay.nix) ];
overlays = [
(import ./python312overlay.nix)
nix-comfyui.overlays.default
];
};
in {

View file

@ -5,6 +5,7 @@ with lib;
services = {
ollama = {
enable = true;
host = "0.0.0.0";
# package = unstable.ollama;
# port = 11434;
acceleration = "cuda";

View file

@ -2,8 +2,24 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, lib, pkgs, ... }:
{ config, lib, pkgs, unstable, ... }:
let
my-comfyui = unstable.comfyuiPackages.comfyui.override {
extensions = [
unstable.comfyuiPackages.extensions.acly-inpaint
unstable.comfyuiPackages.extensions.acly-tooling
unstable.comfyuiPackages.extensions.cubiq-ipadapter-plus
unstable.comfyuiPackages.extensions.fannovel16-controlnet-aux
unstable.comfyuiPackages.extensions.city96-gguf
];
commandLineArgs = [
"--preview-method"
"auto"
];
};
in
{
imports =
[ # Include the results of the hardware scan.
@ -61,6 +77,7 @@
# environment.variables.AMD_VULKAN_ICD = lib.mkDefault "RADV";
environment.systemPackages = with pkgs; [
cudatoolkit
my-comfyui
];
virtualisation.docker.enableNvidia = true;
@ -157,6 +174,12 @@
}
'';
};
virtualHosts = {
"postiz.tfcconnection.org".extraConfig = ''
encode gzip
reverse_proxy localhost:7890
'';
};
virtualHosts = {
"whiteboard.tfcconnection.org".extraConfig = ''
encode gzip
@ -216,11 +239,11 @@
reverse_proxy @live 172.16.1.7:1935
'';
};
virtualHosts = {
"streamdani.tfcconnection.org".extraConfig = ''
reverse_proxy 172.16.1.7:1935
'';
};
# virtualHosts = {
# "streamdani.tfcconnection.org".extraConfig = ''
# reverse_proxy 172.16.1.7:1935
# '';
# };
virtualHosts = {
"tbl.tfcconnection.org".extraConfig = ''
reverse_proxy localhost:9180
@ -323,6 +346,12 @@
reverse_proxy 127.0.0.1:3082
'';
};
virtualHosts = {
"imageai.tfcconnection.org".extraConfig = ''
encode gzip
reverse_proxy 127.0.0.1:4083
'';
};
virtualHosts = {
"api.tfcconnection.org".extraConfig = ''
encode gzip