-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Humaid Alqasimi <[email protected]>
- Loading branch information
1 parent
1733e08
commit 16f3322
Showing
9 changed files
with
241 additions
and
3 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright 2024 TII (SSRC) and the Ghaf contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
{ config, lib, ... }: | ||
let | ||
cfg = config.ghaf.reference.services; | ||
inherit (lib) mkIf; | ||
in | ||
{ | ||
config = mkIf (cfg.ollama) { | ||
services.ollama = { | ||
enable = true; | ||
openFirewall = true; | ||
host = "0.0.0.0"; | ||
loadModels = [ "falcon2" ]; | ||
}; | ||
systemd.services.ollama.serviceConfig = { | ||
TimeoutStartSec = "5h"; | ||
Restart = "always"; | ||
RestartSec = "5s"; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Copyright 2022-2024 TII (SSRC) and the Ghaf contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
{ prev, final }: | ||
let | ||
inherit (prev) python3Packages fetchFromGitHub lib; | ||
in | ||
python3Packages.buildPythonApplication rec { | ||
pname = "alpaca"; | ||
version = "2.0.5"; | ||
pyproject = false; # Built with meson | ||
|
||
src = fetchFromGitHub { | ||
owner = "Jeffser"; | ||
repo = "Alpaca"; | ||
rev = "refs/tags/${version}"; | ||
hash = "sha256-BLLcU2GESyHGFJJicE42V3nMFf/YfnYsXcAOPIHuCAg="; | ||
}; | ||
|
||
nativeBuildInputs = with prev; [ | ||
appstream | ||
meson | ||
ninja | ||
pkg-config | ||
gobject-introspection | ||
wrapGAppsHook4 | ||
desktop-file-utils | ||
]; | ||
|
||
buildInputs = with prev; [ | ||
libadwaita | ||
gtksourceview5 | ||
]; | ||
|
||
dependencies = with python3Packages; [ | ||
pygobject3 | ||
requests | ||
pillow | ||
pypdf | ||
pytube | ||
html2text | ||
]; | ||
|
||
dontWrapGApps = true; | ||
|
||
makeWrapperArgs = [ | ||
"\${gappsWrapperArgs[@]}" | ||
"--prefix PATH : ${lib.makeBinPath [ prev.xdg-utils final.ollama ]}" | ||
# Declared but not used in src/window.py, for later reference | ||
# https://github.com/flatpak/flatpak/issues/3229 | ||
"--set FLATPAK_DEST ${placeholder "out"}" | ||
]; | ||
|
||
meta = { | ||
description = "Ollama client made with GTK4 and Adwaita"; | ||
longDescription = '' | ||
To run Alpaca with GPU acceleration enabled, simply override it: | ||
```nix | ||
pkgs.alpaca.override { | ||
ollama = pkgs.ollama-cuda; | ||
} | ||
``` | ||
Or using `pkgs.ollama-rocm` for AMD GPUs. | ||
''; | ||
homepage = "https://jeffser.com/alpaca"; | ||
license = lib.licenses.gpl3Plus; | ||
mainProgram = "alpaca"; | ||
maintainers = with lib.maintainers; [ aleksana ]; | ||
platforms = lib.platforms.linux; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright 2022-2024 TII (SSRC) and the Ghaf contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# This overlay customizes labwc - see comments for details | ||
# | ||
{ prev }: | ||
prev.ollama.overrideAttrs { | ||
src = prev.fetchFromGitHub { | ||
owner = "ollama"; | ||
repo = "ollama"; | ||
rev = "v0.3.1"; | ||
hash = "sha256-ctz9xh1wisG0YUxglygKHIvU9bMgMLkGqDoknb8qSAU="; | ||
fetchSubmodules = true; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters