Compare commits
No commits in common. "77ab4781ac005f89a76eef72113f766ed2b6828b" and "c6ec40a3f7a12e2be5eed3fc7419a4c75accd105" have entirely different histories.
77ab4781ac
...
c6ec40a3f7
8 changed files with 55 additions and 187 deletions
|
@ -123,7 +123,7 @@
|
||||||
"browser.bookmarks.addedImportButton" = true;
|
"browser.bookmarks.addedImportButton" = true;
|
||||||
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
|
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
|
||||||
|
|
||||||
# Usage Experience
|
# Usage Experiance
|
||||||
"browser.startup.homepage" = "about:home";
|
"browser.startup.homepage" = "about:home";
|
||||||
"browser.download.useDownloadDir" = false;
|
"browser.download.useDownloadDir" = false;
|
||||||
"browser.uiCustomization.state" = builtins.toJSON {
|
"browser.uiCustomization.state" = builtins.toJSON {
|
||||||
|
|
|
@ -65,58 +65,58 @@ in {
|
||||||
# builtins.elemAt osConfig.services.ollama.loadModels 0;
|
# builtins.elemAt osConfig.services.ollama.loadModels 0;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
extensions = (
|
|
||||||
with open-vsx;
|
|
||||||
[
|
|
||||||
# vs code feel extensions
|
|
||||||
ms-vscode.atom-keybindings
|
|
||||||
akamud.vscode-theme-onedark
|
|
||||||
streetsidesoftware.code-spell-checker
|
|
||||||
streetsidesoftware.code-spell-checker-german
|
|
||||||
streetsidesoftware.code-spell-checker-italian
|
|
||||||
jeanp413.open-remote-ssh
|
|
||||||
|
|
||||||
# html extensions
|
|
||||||
formulahendry.auto-rename-tag
|
|
||||||
ms-vscode.live-server
|
|
||||||
|
|
||||||
# js extensions
|
|
||||||
dsznajder.es7-react-js-snippets
|
|
||||||
dbaeumer.vscode-eslint
|
|
||||||
standard.vscode-standard
|
|
||||||
firsttris.vscode-jest-runner
|
|
||||||
stylelint.vscode-stylelint
|
|
||||||
tauri-apps.tauri-vscode
|
|
||||||
|
|
||||||
# go extensions
|
|
||||||
golang.go
|
|
||||||
|
|
||||||
# astro blog extensions
|
|
||||||
astro-build.astro-vscode
|
|
||||||
unifiedjs.vscode-mdx
|
|
||||||
|
|
||||||
# misc extensions
|
|
||||||
tamasfe.even-better-toml
|
|
||||||
]
|
|
||||||
++ (lib.lists.optionals nix-development-enabled [
|
|
||||||
# nix extensions
|
|
||||||
pinage404.nix-extension-pack
|
|
||||||
jnoortheen.nix-ide
|
|
||||||
kamadorueda.alejandra
|
|
||||||
])
|
|
||||||
++ (
|
|
||||||
with vscode-marketplace;
|
|
||||||
[
|
|
||||||
# js extensions
|
|
||||||
karyfoundation.nearley
|
|
||||||
]
|
|
||||||
++ (lib.lists.optionals ai-tooling-enabled [
|
|
||||||
continue.continue
|
|
||||||
])
|
|
||||||
)
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extensions = (
|
||||||
|
with open-vsx;
|
||||||
|
[
|
||||||
|
# vs code feel extensions
|
||||||
|
ms-vscode.atom-keybindings
|
||||||
|
akamud.vscode-theme-onedark
|
||||||
|
streetsidesoftware.code-spell-checker
|
||||||
|
streetsidesoftware.code-spell-checker-german
|
||||||
|
streetsidesoftware.code-spell-checker-italian
|
||||||
|
jeanp413.open-remote-ssh
|
||||||
|
|
||||||
|
# html extensions
|
||||||
|
formulahendry.auto-rename-tag
|
||||||
|
ms-vscode.live-server
|
||||||
|
|
||||||
|
# js extensions
|
||||||
|
dsznajder.es7-react-js-snippets
|
||||||
|
dbaeumer.vscode-eslint
|
||||||
|
standard.vscode-standard
|
||||||
|
firsttris.vscode-jest-runner
|
||||||
|
stylelint.vscode-stylelint
|
||||||
|
tauri-apps.tauri-vscode
|
||||||
|
|
||||||
|
# go extensions
|
||||||
|
golang.go
|
||||||
|
|
||||||
|
# astro blog extensions
|
||||||
|
astro-build.astro-vscode
|
||||||
|
unifiedjs.vscode-mdx
|
||||||
|
|
||||||
|
# misc extensions
|
||||||
|
tamasfe.even-better-toml
|
||||||
|
]
|
||||||
|
++ (lib.lists.optionals nix-development-enabled [
|
||||||
|
# nix extensions
|
||||||
|
pinage404.nix-extension-pack
|
||||||
|
jnoortheen.nix-ide
|
||||||
|
kamadorueda.alejandra
|
||||||
|
])
|
||||||
|
++ (
|
||||||
|
with vscode-marketplace;
|
||||||
|
[
|
||||||
|
# js extensions
|
||||||
|
karyfoundation.nearley
|
||||||
|
]
|
||||||
|
++ (lib.lists.optionals ai-tooling-enabled [
|
||||||
|
continue.continue
|
||||||
|
])
|
||||||
|
)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
[
|
[
|
||||||
"leyla"
|
"leyla"
|
||||||
"webdav"
|
"webdav"
|
||||||
"ollama"
|
|
||||||
"optimise"
|
|
||||||
]
|
]
|
||||||
|
|
|
@ -201,28 +201,13 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
ollama = {
|
ollama = {
|
||||||
enable = true;
|
enable = false;
|
||||||
exposePort = true;
|
|
||||||
|
|
||||||
loadModels = [
|
loadModels = [
|
||||||
# conversation models
|
"deepseek-coder:6.7b"
|
||||||
"llama3.1:8b"
|
|
||||||
"deepseek-r1:8b"
|
"deepseek-r1:8b"
|
||||||
"deepseek-r1:32b"
|
"deepseek-r1:32b"
|
||||||
"deepseek-r1:70b"
|
"deepseek-r1:70b"
|
||||||
|
|
||||||
# auto complete models
|
|
||||||
"qwen2.5-coder:1.5b-base"
|
|
||||||
"qwen2.5-coder:7b"
|
|
||||||
"deepseek-coder:6.7b"
|
|
||||||
"deepseek-coder:33b"
|
|
||||||
|
|
||||||
# agent models
|
|
||||||
"qwen3:8b"
|
|
||||||
"qwen3:32b"
|
|
||||||
|
|
||||||
# embedding models
|
|
||||||
"nomic-embed-text:latest"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
tailscale = {
|
tailscale = {
|
||||||
|
|
|
@ -30,65 +30,8 @@
|
||||||
graphicsAcceleration.enable = true;
|
graphicsAcceleration.enable = true;
|
||||||
directAccess.enable = true;
|
directAccess.enable = true;
|
||||||
};
|
};
|
||||||
ai = {
|
|
||||||
enable = true;
|
|
||||||
# TODO: benchmark twilight against defiant and prune this list of models that are faster on defiant
|
|
||||||
models = {
|
|
||||||
# conversation models
|
|
||||||
"lamma3.1:8b" = {
|
|
||||||
model = "lamma3.1:8b";
|
|
||||||
# TODO: figure out what should be in this array
|
|
||||||
# roles = [""];
|
|
||||||
};
|
|
||||||
"deepseek-r1:8b" = {
|
|
||||||
model = "deepseek-r1:8b";
|
|
||||||
# TODO: figure out what should be in this array
|
|
||||||
# roles = [""];
|
|
||||||
};
|
|
||||||
"deepseek-r1:32b" = {
|
|
||||||
model = "deepseek-r1:32b";
|
|
||||||
# TODO: figure out what should be in this array
|
|
||||||
# roles = [""];
|
|
||||||
};
|
|
||||||
|
|
||||||
# auto complete models
|
|
||||||
"qwen2.5-coder:1.5b-base" = {
|
|
||||||
model = "qwen2.5-coder:1.5b-base";
|
|
||||||
# TODO: figure out what should be in this array
|
|
||||||
# roles = [""];
|
|
||||||
};
|
|
||||||
"qwen2.5-coder:7b" = {
|
|
||||||
model = "qwen2.5-coder:7b";
|
|
||||||
# TODO: figure out what should be in this array
|
|
||||||
# roles = [""];
|
|
||||||
};
|
|
||||||
"deepseek-coder:6.7b" = {
|
|
||||||
model = "deepseek-coder:6.7b";
|
|
||||||
# TODO: figure out what should be in this array
|
|
||||||
# roles = [""];
|
|
||||||
};
|
|
||||||
"deepseek-coder:33b" = {
|
|
||||||
model = "deepseek-coder:33b";
|
|
||||||
# TODO: figure out what should be in this array
|
|
||||||
# roles = [""];
|
|
||||||
};
|
|
||||||
|
|
||||||
# agent models
|
|
||||||
"qwen3:32b" = {
|
|
||||||
model = "qwen3:32b";
|
|
||||||
# TODO: figure out what should be in this array
|
|
||||||
# roles = [""];
|
|
||||||
};
|
|
||||||
|
|
||||||
# embedding models
|
|
||||||
"nomic-embed-text:latest" = {
|
|
||||||
model = "nomic-embed-text:latest";
|
|
||||||
# TODO: figure out what should be in this array
|
|
||||||
# roles = [""];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
ollama = {
|
ollama = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
{lib, ...}: {
|
|
||||||
options.host = {
|
|
||||||
ai = {
|
|
||||||
enable = lib.mkEnableOption "should we use AI on this machine";
|
|
||||||
models = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({name, ...}: {
|
|
||||||
option = {
|
|
||||||
name = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = name;
|
|
||||||
};
|
|
||||||
model = {
|
|
||||||
type = lib.types.str;
|
|
||||||
};
|
|
||||||
provider = {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "ollama";
|
|
||||||
};
|
|
||||||
apiBase = {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = null;
|
|
||||||
};
|
|
||||||
roles = {
|
|
||||||
type = lib.types.listOf lib.types.enumOf [
|
|
||||||
"chat"
|
|
||||||
"autocomplete"
|
|
||||||
"embed"
|
|
||||||
"rerank"
|
|
||||||
"edit"
|
|
||||||
"apply"
|
|
||||||
"summarize"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
# TODO: configure ollama to download any modules listed in options.host.ai.models.{name}.model if options.host.ai.models.{name}.apiBase is null
|
|
||||||
# TODO: if we have any models that have a non null options.host.ai.models.{name}.apiBase then set services.ollama.enable to a lib.mkAfter true
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -12,7 +12,6 @@
|
||||||
./impermanence.nix
|
./impermanence.nix
|
||||||
./disko.nix
|
./disko.nix
|
||||||
./ollama.nix
|
./ollama.nix
|
||||||
./continue.nix
|
|
||||||
./tailscale.nix
|
./tailscale.nix
|
||||||
./server
|
./server
|
||||||
];
|
];
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
options = {
|
|
||||||
services.ollama.exposePort = lib.mkEnableOption "should we expose ollama on tailscale";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
{
|
{
|
||||||
services.ollama = {
|
services.ollama = {
|
||||||
|
@ -26,15 +22,6 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
networking.firewall.interfaces.${config.services.tailscale.interfaceName} = let
|
|
||||||
ports = [
|
|
||||||
config.services.ollama.port
|
|
||||||
];
|
|
||||||
in
|
|
||||||
lib.mkIf config.services.ollama.exposePort {
|
|
||||||
allowedTCPPorts = ports;
|
|
||||||
allowedUDPPorts = ports;
|
|
||||||
};
|
|
||||||
}))
|
}))
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue