comfyui mostly done

This commit is contained in:
atagen 2024-10-18 14:16:35 +11:00
parent ca53366fd0
commit 58243274cd
23 changed files with 1148 additions and 114 deletions

View file

@ -1,4 +1,10 @@
{pkgs, ...}: {
{
inputs,
pkgs,
lib,
config,
...
}: {
imports = [
./home.nix
./util/local-webapp.nix
@ -6,6 +12,7 @@
# ./programs/stable-diffusion.nix
# ./programs/openwebui.nix
./programs/anything-llm.nix
inputs.comfyui.homeManagerModules.comfyui
];
mainUser = "bolt";
@ -13,4 +20,16 @@
home.packages = with pkgs; [
nicotine-plus
];
programs.comfyui = {
enable = true;
storage = "/home/${config.mainUser}/.local/share/comfyui/";
plugins = let
inherit (pkgs.comfyui-plugins) gguf openpose;
in [
gguf
# essentials
openpose
];
};
}

291
home/programs/helix-ai.nix Normal file
View file

@ -0,0 +1,291 @@
{
config,
lib,
pkgs,
...
}: let
palette-hex = pkgs.lib.nix-rice.palette.toRgbHex pkgs.rice.palette;
palette-shex = pkgs.lib.nix-rice.palette.toRGBShortHex pkgs.rice.palette;
in {
programs.helix = {
enable = true;
themes = with palette-hex; {
nix-rice = {
"attribute" = bright.cyan;
"keyword" = {fg = normal.red;};
"keyword.directive" = normal.red;
"namespace" = bright.cyan;
"punctuation" = bright.yellow;
"punctuation.delimiter" = bright.yellow;
"operator" = bright.magenta;
"special" = normal.magenta;
"variable.other.member" = bright.blue;
"variable" = util.fg;
"variable.builtin" = bright.yellow;
"variable.parameter" = bright.white;
"type" = normal.yellow;
"type.builtin" = normal.yellow;
"constructor" = {
fg = bright.magenta;
modifiers = ["bold"];
};
"function" = {
fg = normal.green;
modifiers = ["bold"];
};
"function.macro" = bright.cyan;
"function.builtin" = normal.yellow;
"tag" = normal.red;
"comment" = {
fg = normal.magenta;
modifiers = ["italic"];
};
"constant" = {fg = bright.magenta;};
"constant.builtin" = {
fg = bright.magenta;
modifiers = ["bold"];
};
"string" = normal.green;
"constant.numeric" = bright.magenta;
"constant.character.escape" = {
fg = bright.white;
modifiers = ["bold"];
};
"label" = bright.cyan;
"module" = bright.cyan;
"diff.plus" = bright.green;
"diff.delta" = bright.yellow;
"diff.minus" = bright.red;
"warning" = bright.yellow;
"error" = bright.red;
"info" = bright.cyan;
"hint" = bright.blue;
"ui.background" = {bg = util.bg;};
"ui.linenr" = {fg = normal.cyan;};
"ui.linenr.selected" = {
fg = normal.yellow;
modifiers = ["bold"];
};
"ui.cursorline" = {bg = normal.black;};
"ui.statusline" = {
fg = util.fg;
bg = bright.black;
};
"ui.statusline.normal" = {
fg = util.fg;
bg = bright.black;
};
"ui.statusline.insert" = {
fg = util.fg;
bg = normal.blue;
};
"ui.statusline.select" = {
fg = util.fg;
bg = bright.yellow;
};
"ui.statusline.inactive" = {
fg = normal.white;
bg = normal.black;
};
"ui.popup" = {bg = normal.black;};
"ui.window" = {bg = normal.black;};
"ui.help" = {
bg = normal.black;
fg = util.fg;
};
"ui.text" = {fg = util.fg;};
"ui.text.focus" = {fg = util.fg;};
"ui.selection" = {
# modifiers = ["reversed"];
bg = bright.yellow;
};
"ui.selection.primary" = {modifiers = ["reversed"];};
# "ui.selection.primary" = { bg = bright.cyan; };
"ui.cursor.primary" = {
bg = normal.white;
fg = normal.black;
};
"ui.cursor.match" = {bg = bright.cyan;};
"ui.menu" = {
fg = util.fg;
bg = bright.black;
};
"ui.menu.selected" = {
fg = bright.black;
bg = bright.blue;
modifiers = ["bold"];
};
"ui.virtual.whitespace" = bright.black;
"ui.virtual.ruler" = {bg = normal.black;};
"ui.virtual.inlay-hint" = {fg = normal.magenta;};
"diagnostic.warning" = {
underline = {
color = bright.yellow;
style = "curl";
};
};
"diagnostic.error" = {
underline = {
color = bright.red;
style = "curl";
};
};
"diagnostic.info" = {
underline = {
color = bright.cyan;
style = "curl";
};
};
"diagnostic.hint" = {
underline = {
color = bright.blue;
style = "curl";
};
};
"markup.heading" = bright.cyan;
"markup.bold" = {modifiers = ["bold"];};
"markup.italic" = {modifiers = ["italic"];};
"markup.strikethrough" = {modifiers = ["crossed_out"];};
"markup.link.url" = {
fg = bright.green;
modifiers = ["underlined"];
};
"markup.link.text" = bright.red;
"markup.raw" = bright.red;
};
};
# theme = "nix-rice"
# [editor]
# bufferline = "multiple"
# cursorline = true
# true-color = true
# [editor.cursor-shape]
# insert = "bar"
# normal = "block"
# select = "underline"
# [editor.lsp]
# display-messages = true
# [editor.statusline]
# left = ["mode", "spinner", "version-control", "file-name", "file-modification-indicator"]
settings = {
theme = "nix-rice";
editor = {
bufferline = "multiple";
cursorline = true;
true-color = true;
cursor-shape = {
insert = "bar";
normal = "block";
select = "underline";
};
statusline.left = ["mode" "spinner" "version-control" "file-name" "file-modification-indicator"];
lsp.display-messages = true;
keys = let
extend = {
"A-x" = "extend_to_line_bounds";
"X" = ["extend_line_up" "extend_to_line_bounds"];
};
in {
normal = extend;
select = extend;
};
};
};
languages = {
language = [
{
name = "rust";
language-servers = ["rust-analyzer" "lsp-ai"];
auto-format = true;
}
{
name = "nix";
language-servers = ["nixd" "lsp-ai"];
file-types = ["nix"];
# auto-format = true;
formatter = {
command = "alejandra";
};
}
{
name = "ocaml";
language-servers = ["ocamllsp" "lsp-ai"];
file-types = ["ml" "mli"];
auto-format = true;
formatter = {
command = "ocamlformat";
};
}
];
language-server = {
nixd = {
command = "nixd";
};
lsp-ai = {
command = "lsp-ai";
config = {
memory.fileStore = {};
models = {
llama32 = {
type = "ollama";
model = "llama3.2";
};
starcoder2 = {
type = "ollama";
model = "starcoder2:7b";
};
};
completion = {
model = "starcoder2";
parameters = {
maxContext = 1024;
options = {
numPredict = 32;
};
postProcess = {
removeDuplicateStart = true;
removeDuplicateEnd = true;
};
};
};
chat = {
trigger = "!C";
action_display_name = "Chat";
model = "llama32";
parameters = {
max_context = 4096;
max_tokens = 1024;
system = "You are a code assistant chatbot. The user will ask you for assistance coding and you will do your best to answer succinctly and accurately.";
};
};
};
};
rust-analyzer = {
config = {
cargo = {
buildScripts = {
enable = true;
};
};
procMacro = {
enable = true;
};
check = {
command = "clippy";
};
};
};
}; #language-server
}; #languages
}; #helix config
}

View file

@ -155,9 +155,47 @@ in {
};
};
# theme = "nix-rice"
# [editor]
# bufferline = "multiple"
# cursorline = true
# true-color = true
# [editor.cursor-shape]
# insert = "bar"
# normal = "block"
# select = "underline"
# [editor.lsp]
# display-messages = true
# [editor.statusline]
# left = ["mode", "spinner", "version-control", "file-name", "file-modification-indicator"]
settings = {
theme = "nix-rice";
editor.lsp.display-messages = true;
editor = {
bufferline = "multiple";
cursorline = true;
true-color = true;
cursor-shape = {
insert = "bar";
normal = "block";
select = "underline";
};
statusline.left = ["mode" "spinner" "version-control" "file-name" "file-modification-indicator"];
lsp.display-messages = true;
# keys = let
# extend = {
# "A-x" = "extend_to_line_bounds";
# "X" = ["extend_line_up" "extend_to_line_bounds"];
# };
# in {
# normal = extend;
# select = extend;
# };
};
};
languages = {
@ -170,7 +208,7 @@ in {
name = "nix";
language-servers = ["nixd"];
file-types = ["nix"];
auto-format = true;
# auto-format = true;
formatter = {
command = "alejandra";
};

View file

@ -17,27 +17,27 @@
mount -> column -t -> culr -t 80 -o roygbiv-split
}
function la_culr {
if { $1 } {
eza -lha --group-directories-first --icons --color=always $1 -> culr -t 80 -o roygbiv-split
} else {
function la_culr (!path: str) {
if { is-null $path } {
eza -lha --group-directories-first --icons --color=always -> culr -t 80 -o roygbiv-split
}
}
function ls_culr {
if { $1 } {
eza -lh --group-directories-first --icons --color=always $1 -> culr -t 80 -o roygbiv-split
} else {
eza -lh --group-directories-first --icons --color=always -> culr -t 80 -o roygbiv-split
eza -lha --group-directories-first --icons --color=always $path -> culr -t 80 -o roygbiv-split
}
}
function ps_culr {
if { $1 } {
ps ww$1 | culr -t 80 -o roygbiv-split
} else {
function ls_culr (!path: str) {
if { is-null $path } {
eza -lh --group-directories-first --icons --color=always -> culr -t 80 -o roygbiv-split
} else {
eza -lh --group-directories-first --icons --color=always $path -> culr -t 80 -o roygbiv-split
}
}
function ps_culr (!cmd: str) {
if { is-null $cmd } {
ps ww | culr -t 80 -o roygbiv-split
} else {
ps ww$cmd | culr -t 80 -o roygbiv-split
}
}