Compare commits
1 commit
e5d1ba38d4
...
1029f738b8
| Author | SHA1 | Date | |
|---|---|---|---|
| 1029f738b8 |
5 changed files with 76 additions and 13 deletions
|
|
@ -135,31 +135,36 @@ config.keys = {
|
||||||
action = wezterm.action.SplitHorizontal({ domain = "CurrentPaneDomain" }),
|
action = wezterm.action.SplitHorizontal({ domain = "CurrentPaneDomain" }),
|
||||||
},
|
},
|
||||||
|
|
||||||
{ -- Dynamic pane management
|
{ -- Dynamic pane management: Creates development layout or toggles focus between editor and terminal
|
||||||
key = "`",
|
key = "`",
|
||||||
mods = "LEADER",
|
mods = "LEADER",
|
||||||
action = wezterm.action_callback(function(_, pane)
|
action = wezterm.action_callback(function(_, pane)
|
||||||
local tab = pane:tab()
|
local tab = pane:tab()
|
||||||
local panes = tab:panes_with_info()
|
local panes = tab:panes_with_info()
|
||||||
|
|
||||||
|
-- Case 1: Single pane - Create a 3-pane development layout
|
||||||
if #panes == 1 then
|
if #panes == 1 then
|
||||||
|
-- First split: Create bottom terminal pane (30% height)
|
||||||
pane:split({
|
pane:split({
|
||||||
direction = "Bottom",
|
direction = "Bottom",
|
||||||
size = 0.30,
|
size = 0.30,
|
||||||
})
|
})
|
||||||
|
-- Second split: Create left sidebar for Claude Code (25% width)
|
||||||
pane:split({
|
pane:split({
|
||||||
direction = "Left",
|
direction = "Left",
|
||||||
size = 0.26,
|
size = 0.25,
|
||||||
args = { "claude" }
|
args = { "claude" } -- Launch Claude Code in the sidebar
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Case 2: Multiple panes exist, pane 2 (editor) is not zoomed - Focus and zoom editor
|
||||||
elseif not panes[2].is_zoomed then
|
elseif not panes[2].is_zoomed then
|
||||||
panes[2].pane:activate()
|
panes[2].pane:activate() -- Switch to editor pane (typically Neovim)
|
||||||
tab:set_zoomed(true)
|
tab:set_zoomed(true) -- Zoom to hide other panes for focused editing
|
||||||
|
|
||||||
|
-- Case 3: Pane 2 (editor) is currently zoomed - Unzoom and return to terminal
|
||||||
elseif panes[2].is_zoomed then
|
elseif panes[2].is_zoomed then
|
||||||
tab:set_zoomed(false)
|
tab:set_zoomed(false) -- Restore multi-pane layout
|
||||||
panes[3].pane:activate()
|
panes[3].pane:activate() -- Focus the terminal pane for quick commands
|
||||||
end
|
end
|
||||||
end),
|
end),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
./amdgpu-clocks
|
./amdgpu-clocks
|
||||||
./flatpak
|
./flatpak
|
||||||
./libinput
|
./libinput
|
||||||
|
./ollama
|
||||||
./pipewire
|
./pipewire
|
||||||
./printing
|
./printing
|
||||||
./udev
|
./udev
|
||||||
|
|
|
||||||
50
nixos/fuchsia/services/ollama/default.nix
Normal file
50
nixos/fuchsia/services/ollama/default.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
{...}: {
|
||||||
|
# Get up and running with large language models locally.
|
||||||
|
services.ollama = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# User and group under which to run ollama
|
||||||
|
user = "ollama";
|
||||||
|
group = "ollama";
|
||||||
|
|
||||||
|
# AMD GPU Support
|
||||||
|
acceleration = "rocm";
|
||||||
|
# 5700xt Support
|
||||||
|
rocmOverrideGfx = "10.1.0";
|
||||||
|
|
||||||
|
# Language models to install
|
||||||
|
loadModels = [
|
||||||
|
"deepseek-r1:8b"
|
||||||
|
"gemma3:4b"
|
||||||
|
"qwen3:8b"
|
||||||
|
"llama3:8b"
|
||||||
|
|
||||||
|
# Coding models
|
||||||
|
"qwen2.5-coder:7b"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Location to store models
|
||||||
|
models = "/srv/ollama/models";
|
||||||
|
|
||||||
|
# Increase context window
|
||||||
|
environmentVariables = {
|
||||||
|
OLLAMA_CONTEXT_LENGTH = "8192";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable the Open-WebUI server
|
||||||
|
services.open-webui = {
|
||||||
|
enable = true;
|
||||||
|
host = "fuchsia.home.arpa";
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Mount our subvolume for storage of models
|
||||||
|
fileSystems = {
|
||||||
|
"/srv/ollama" = {
|
||||||
|
device = "/dev/disk/by-label/data";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = ["subvol=srv-ollama" "compress=zstd"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -7,5 +7,13 @@
|
||||||
];
|
];
|
||||||
service = "api@internal";
|
service = "api@internal";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
open-webui = {
|
||||||
|
rule = "Host(`ollama.home.arpa`)";
|
||||||
|
entryPoints = [
|
||||||
|
"websecure"
|
||||||
|
];
|
||||||
|
service = "open-webui";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
{...}: {
|
{...}: {
|
||||||
# # Example
|
services.traefik.dynamicConfigOptions.http.services = {
|
||||||
# services.traefik.dynamicConfigOptions.http.services = {
|
open-webui.loadBalancer.servers = [
|
||||||
# open-webui.loadBalancer.servers = [
|
{url = "http://fuchsia.home.arpa:8080";}
|
||||||
# {url = "http://fuchsia.home.arpa:8080";}
|
];
|
||||||
# ];
|
};
|
||||||
# };
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue