add ollama and safe mode
This commit is contained in:
parent
1bf4f8e96e
commit
77e83981d7
4 changed files with 43 additions and 28 deletions
|
|
@ -1,3 +1,19 @@
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
services = {
|
||||||
|
ollama = {
|
||||||
|
enable = true;
|
||||||
|
host = "127.0.0.1";
|
||||||
|
port = 11434;
|
||||||
|
# loadModels = [ "gemma3n:e4b" "gemma3n:e2b" ];
|
||||||
|
};
|
||||||
|
open-webui = {
|
||||||
|
enable = true;
|
||||||
|
port = 8080;
|
||||||
|
environment = {
|
||||||
|
OLLAMA_BASE_URL = "http://localhost:11434";
|
||||||
|
WEBUI_AUTH = "False";
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -58,6 +58,7 @@
|
||||||
[ "ApacheHTTPD" "apache" "https://cdn.proxy.${homelab.domain}" "http://localhost:3000/" ]
|
[ "ApacheHTTPD" "apache" "https://cdn.proxy.${homelab.domain}" "http://localhost:3000/" ]
|
||||||
[ "Forgejo" "forgejo" "https://git.proxy.${homelab.domain}" "http://localhost:5080/" ]
|
[ "Forgejo" "forgejo" "https://git.proxy.${homelab.domain}" "http://localhost:5080/" ]
|
||||||
[ "Dockge" "docker" "https://containers.proxy.${homelab.domain}" "http://localhost:5001/" ]
|
[ "Dockge" "docker" "https://containers.proxy.${homelab.domain}" "http://localhost:5001/" ]
|
||||||
|
[ "Ollama" "ollama" "https://ai.proxy.${homelab.domain}" "http://localhost:8080/" ]
|
||||||
];
|
];
|
||||||
bookmarks = [
|
bookmarks = [
|
||||||
[ "Tailscale" "tailscale" "https://login.tailscale.com/" ]
|
[ "Tailscale" "tailscale" "https://login.tailscale.com/" ]
|
||||||
|
|
@ -187,6 +188,22 @@ in {
|
||||||
name = "Dashboard";
|
name = "Dashboard";
|
||||||
show-mobile-header = true;
|
show-mobile-header = true;
|
||||||
columns = [
|
columns = [
|
||||||
|
{
|
||||||
|
type = "bookmarks";
|
||||||
|
groups = [{
|
||||||
|
links = map (e: {
|
||||||
|
same-tab = true;
|
||||||
|
title = builtins.elemAt e 0;
|
||||||
|
icon = "si:${builtins.elemAt e 1}";
|
||||||
|
url = builtins.elemAt e 2;
|
||||||
|
}) bookmarks;
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "to-do";
|
||||||
|
id = "tasks";
|
||||||
|
hide-header = true;
|
||||||
|
}
|
||||||
{
|
{
|
||||||
size = "small";
|
size = "small";
|
||||||
widgets = [
|
widgets = [
|
||||||
|
|
@ -217,9 +234,7 @@ in {
|
||||||
widgets = [
|
widgets = [
|
||||||
{
|
{
|
||||||
type = "server-stats";
|
type = "server-stats";
|
||||||
servers = [{
|
servers = [{ type = "local"; }];
|
||||||
type = "local";
|
|
||||||
}];
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
type = "monitor";
|
type = "monitor";
|
||||||
|
|
@ -235,27 +250,6 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
|
||||||
size = "small";
|
|
||||||
widgets = [
|
|
||||||
{
|
|
||||||
type = "bookmarks";
|
|
||||||
groups = [{
|
|
||||||
links = map (e: {
|
|
||||||
same-tab = true;
|
|
||||||
title = builtins.elemAt e 0;
|
|
||||||
icon = "si:${builtins.elemAt e 1}";
|
|
||||||
url = builtins.elemAt e 2;
|
|
||||||
}) bookmarks;
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
type = "to-do";
|
|
||||||
id = "tasks";
|
|
||||||
hide-header = true;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
{ homelab, lib, ... }: let
|
{ homelab, lib, ... }: let
|
||||||
base = "proxy.${homelab.domain}";
|
base = "proxy.${homelab.domain}";
|
||||||
proxy-mappings = {
|
proxy-mappings = {
|
||||||
|
"dns" = { dest = "http://localhost:8088"; auth = true; };
|
||||||
|
"ai" = { dest = "http://localhost:8080"; auth = true; };
|
||||||
|
|
||||||
"containers" = { dest = "http://localhost:5001"; auth = false; };
|
"containers" = { dest = "http://localhost:5001"; auth = false; };
|
||||||
"auth" = { dest = "http://localhost:1411"; auth = false; };
|
"auth" = { dest = "http://localhost:1411"; auth = false; };
|
||||||
"dns" = { dest = "http://localhost:8088"; auth = true; };
|
|
||||||
"cdn" = { dest = "http://localhost:3000"; auth = false; };
|
"cdn" = { dest = "http://localhost:3000"; auth = false; };
|
||||||
"git" = { dest = "http://localhost:5080"; auth = false; };
|
"git" = { dest = "http://localhost:5080"; auth = false; };
|
||||||
"@" = { dest = "http://localhost:5070"; auth = false; };
|
"@" = { dest = "http://localhost:5070"; auth = false; };
|
||||||
|
|
@ -45,6 +47,7 @@ in {
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header X-Auth-User $remote_user;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}) proxy-mappings;
|
}) proxy-mappings;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{ lib, ... }: {
|
{ config, lib, ... }: {
|
||||||
imports = [
|
imports = lib.mkIf (config.specialisation != {}) [
|
||||||
./homelab/containers.nix
|
./homelab/containers.nix
|
||||||
./homelab/gallery.nix
|
./homelab/gallery.nix
|
||||||
./homelab/media.nix
|
./homelab/media.nix
|
||||||
|
|
@ -13,6 +13,8 @@
|
||||||
./base.nix
|
./base.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
specialisation.safe-mode.configuration = {};
|
||||||
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
oci-containers.backend = "docker";
|
oci-containers.backend = "docker";
|
||||||
docker = {
|
docker = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue