Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3049a605a2 | |||
| 7dc85f8f9a | |||
| 1ecec8e0d6 |
@@ -29,7 +29,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
ollama = {
|
ollama = {
|
||||||
endpoint = "http://100.109.179.25:11434"; # tailscale IP, no /v1 suffix
|
endpoint = "http://100.86.56.71:11434"; # tailscale IP, no /v1 suffix
|
||||||
model = "qwen2.5:3b"; # swap for "llama3.2:3b" or "deepseek-r1:1.5b"
|
model = "qwen2.5:3b"; # swap for "llama3.2:3b" or "deepseek-r1:1.5b"
|
||||||
timeout = 60000; # local + small model can be slow on first load
|
timeout = 60000; # local + small model can be slow on first load
|
||||||
disable_tools = true; # these small models aren't reliable at tool calling
|
disable_tools = true; # these small models aren't reliable at tool calling
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ _: {
|
|||||||
npm = "@ai-sdk/openai-compatible";
|
npm = "@ai-sdk/openai-compatible";
|
||||||
name = "Ollama (tailscale)";
|
name = "Ollama (tailscale)";
|
||||||
options = {
|
options = {
|
||||||
baseURL = "http://100.109.179.25:11434/v1";
|
baseURL = "http://100.86.56.71:11434/v1";
|
||||||
};
|
};
|
||||||
models = {
|
models = {
|
||||||
"llama3.2:3b" = {
|
"llama3.2:3b" = {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
_:
|
_:
|
||||||
let
|
let
|
||||||
upstream = "100.109.179.25";
|
|
||||||
|
upstream = "100.86.56.71";
|
||||||
|
|
||||||
mkProxy = port: {
|
mkProxy = port: {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|||||||
@@ -7,4 +7,5 @@ final: prev:
|
|||||||
inherit (prev) vaultwarden;
|
inherit (prev) vaultwarden;
|
||||||
};
|
};
|
||||||
netradiant-custom = final.callPackage ./netradiant-custom.nix { };
|
netradiant-custom = final.callPackage ./netradiant-custom.nix { };
|
||||||
|
xonotic-latest = final.callPackage ./xonotic-latest.nix { };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,253 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitLab,
|
||||||
|
makeWrapper,
|
||||||
|
runCommand,
|
||||||
|
makeDesktopItem,
|
||||||
|
copyDesktopItems,
|
||||||
|
gmqcc,
|
||||||
|
libjpeg,
|
||||||
|
zlib,
|
||||||
|
libvorbis,
|
||||||
|
curl,
|
||||||
|
freetype,
|
||||||
|
libpng,
|
||||||
|
libtheora,
|
||||||
|
libx11,
|
||||||
|
SDL2,
|
||||||
|
gmp,
|
||||||
|
git,
|
||||||
|
gcc,
|
||||||
|
autoconf,
|
||||||
|
automake,
|
||||||
|
libtool,
|
||||||
|
withSDL ? true,
|
||||||
|
withDedicated ? true,
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
version = "0-unstable-2025-01-01";
|
||||||
|
target = "release";
|
||||||
|
|
||||||
|
darkplaces-src = fetchFromGitLab {
|
||||||
|
domain = "gitlab.com";
|
||||||
|
owner = "xonotic";
|
||||||
|
repo = "darkplaces";
|
||||||
|
rev = "ddabe55ae766087df0b82d214ca4b6d79a443345";
|
||||||
|
hash = "sha256-S1jWfMx60lTcpMv4DxoDI2BT124bo/jzjtezSsQUL2M=";
|
||||||
|
};
|
||||||
|
|
||||||
|
d0_blind_id-src = fetchFromGitLab {
|
||||||
|
domain = "gitlab.com";
|
||||||
|
owner = "xonotic";
|
||||||
|
repo = "d0_blind_id";
|
||||||
|
rev = "64983f4156e860a94a6f5e264c67a1c2df69d7e9";
|
||||||
|
hash = "sha256-KblIXuzDTcFk7x3YFtJkugrqZ47+aQbDE0fL/sfUxUc=";
|
||||||
|
};
|
||||||
|
|
||||||
|
xonotic-data = fetchFromGitLab {
|
||||||
|
domain = "gitlab.com";
|
||||||
|
owner = "xonotic";
|
||||||
|
repo = "xonotic-data.pk3dir";
|
||||||
|
rev = "bc2ce0925b46ff79d4deb4cf4995f1330f00de43";
|
||||||
|
hash = "sha256-b5QvLdAFxn/7EjF0lufL1DbuXGgC39k6zfVN7G+mD2I=";
|
||||||
|
};
|
||||||
|
|
||||||
|
xonotic-music = fetchFromGitLab {
|
||||||
|
domain = "gitlab.com";
|
||||||
|
owner = "xonotic";
|
||||||
|
repo = "xonotic-music.pk3dir";
|
||||||
|
rev = "89bd037ad5d7c35fef606f5860d13b8fdbda8e88";
|
||||||
|
hash = "sha256-lYWqjjdMQ5cBfS0WzU3ayDdMGGvlVUuVhu+VCOUm6DU=";
|
||||||
|
};
|
||||||
|
|
||||||
|
xonotic-nexcompat = fetchFromGitLab {
|
||||||
|
domain = "gitlab.com";
|
||||||
|
owner = "xonotic";
|
||||||
|
repo = "xonotic-nexcompat.pk3dir";
|
||||||
|
rev = "a9c3bec5173d5f090fbf2c3a100f864ed35eadb0";
|
||||||
|
hash = "sha256-lYWqjjdMQ5cBfS0WzU3ayDdMGGvlVUuVhu+VCOUm6DU=";
|
||||||
|
};
|
||||||
|
|
||||||
|
xonotic-maps = fetchFromGitLab {
|
||||||
|
domain = "gitlab.com";
|
||||||
|
owner = "xonotic";
|
||||||
|
repo = "xonotic-maps.pk3dir";
|
||||||
|
rev = "552fbb5bdb4266ca374d2c5dc845bcd504bd499a";
|
||||||
|
hash = "sha256-lYWqjjdMQ5cBfS0WzU3ayDdMGGvlVUuVhu+VCOUm6DU=";
|
||||||
|
};
|
||||||
|
|
||||||
|
desktopItem = makeDesktopItem {
|
||||||
|
name = "xonotic-latest";
|
||||||
|
exec = "xonotic-latest";
|
||||||
|
comment = "Free fast-paced first-person shooter (git build)";
|
||||||
|
desktopName = "Xonotic (latest)";
|
||||||
|
categories = [
|
||||||
|
"Game"
|
||||||
|
"Shooter"
|
||||||
|
];
|
||||||
|
icon = "xonotic";
|
||||||
|
startupNotify = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
d0_blind_id-built = stdenv.mkDerivation {
|
||||||
|
pname = "d0_blind_id";
|
||||||
|
inherit version;
|
||||||
|
src = d0_blind_id-src;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
autoconf
|
||||||
|
automake
|
||||||
|
libtool
|
||||||
|
];
|
||||||
|
buildInputs = [ gmp ];
|
||||||
|
preConfigure = "autoreconf -fi";
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
darkplaces-built = stdenv.mkDerivation {
|
||||||
|
pname = "darkplaces-xonotic-latest";
|
||||||
|
inherit version;
|
||||||
|
src = darkplaces-src;
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
libjpeg
|
||||||
|
zlib
|
||||||
|
libvorbis
|
||||||
|
curl
|
||||||
|
gmp
|
||||||
|
libx11
|
||||||
|
SDL2
|
||||||
|
];
|
||||||
|
|
||||||
|
dontStrip = false;
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
env.NIX_CFLAGS_COMPILE = "-std=gnu11";
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
mkdir -p ../d0_blind_id/include ../d0_blind_id/lib
|
||||||
|
cp -r ${d0_blind_id-src}/*.h ../d0_blind_id/include/ 2>/dev/null || true
|
||||||
|
ln -sf ${d0_blind_id-built}/lib/libd0_blind_id.a ../d0_blind_id/lib/
|
||||||
|
ln -sf ${d0_blind_id-built}/lib/libd0_rijndael.a ../d0_blind_id/lib/ 2>/dev/null || true
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
${lib.optionalString withDedicated ''
|
||||||
|
make -j $NIX_BUILD_CORES sv-${target}
|
||||||
|
''}
|
||||||
|
${lib.optionalString withSDL ''
|
||||||
|
make -j $NIX_BUILD_CORES sdl-${target}
|
||||||
|
''}
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
mkdir -p $out/bin
|
||||||
|
|
||||||
|
${lib.optionalString withDedicated ''
|
||||||
|
install -Dm755 darkplaces-dedicated $out/bin/xonotic-latest-dedicated
|
||||||
|
''}
|
||||||
|
${lib.optionalString withSDL ''
|
||||||
|
install -Dm755 darkplaces-sdl $out/bin/xonotic-latest-sdl
|
||||||
|
''}
|
||||||
|
|
||||||
|
${lib.optionalString withDedicated ''
|
||||||
|
patchelf --add-needed ${curl.out}/lib/libcurl.so $out/bin/xonotic-latest-dedicated
|
||||||
|
''}
|
||||||
|
${lib.optionalString withSDL ''
|
||||||
|
patchelf \
|
||||||
|
--add-needed ${curl.out}/lib/libcurl.so \
|
||||||
|
--add-needed ${libvorbis}/lib/libvorbisfile.so \
|
||||||
|
--add-needed ${libvorbis}/lib/libvorbisenc.so \
|
||||||
|
--add-needed ${libvorbis}/lib/libvorbis.so \
|
||||||
|
--add-needed ${freetype}/lib/libfreetype.so \
|
||||||
|
--add-needed ${libpng}/lib/libpng.so \
|
||||||
|
--add-needed ${libtheora}/lib/libtheora.so \
|
||||||
|
$out/bin/xonotic-latest-sdl
|
||||||
|
''}
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
dontPatchELF = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
xonotic-data-compiled = stdenv.mkDerivation {
|
||||||
|
pname = "xonotic-latest-data";
|
||||||
|
inherit version;
|
||||||
|
src = xonotic-data;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
gmqcc
|
||||||
|
git
|
||||||
|
gcc
|
||||||
|
];
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
chmod +w qcsrc/tools/qcc.sh
|
||||||
|
patchShebangs qcsrc/tools/
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
export QCC="${gmqcc}/bin/gmqcc"
|
||||||
|
export CPP="cc -xc -E"
|
||||||
|
export WORKDIR="../.tmp"
|
||||||
|
export QCCFLAGS_WATERMARK="nix_build"
|
||||||
|
export ZIP=true
|
||||||
|
ls -la qcsrc/tools/qcc.sh || echo "MISSING"
|
||||||
|
ls -la qcsrc/tools/ || echo "DIR MISSING"
|
||||||
|
make -C qcsrc -j1
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
mkdir -p $out/data
|
||||||
|
cp -r . $out/data/xonotic-data.pk3dir
|
||||||
|
cp -r ${xonotic-music} $out/data/xonotic-music.pk3dir
|
||||||
|
cp -r ${xonotic-nexcompat} $out/data/xonotic-nexcompat.pk3dir
|
||||||
|
cp -r ${xonotic-maps} $out/data/xonotic-maps.pk3dir
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
runCommand "xonotic-latest-${version}"
|
||||||
|
{
|
||||||
|
inherit version;
|
||||||
|
nativeBuildInputs = [
|
||||||
|
makeWrapper
|
||||||
|
copyDesktopItems
|
||||||
|
];
|
||||||
|
desktopItems = [ desktopItem ];
|
||||||
|
meta = {
|
||||||
|
description = "Free fast-paced first-person shooter (git build)";
|
||||||
|
homepage = "https://xonotic.org/";
|
||||||
|
license = lib.licenses.gpl2Plus;
|
||||||
|
maintainers = with lib.maintainers; [ DerGrumpf ];
|
||||||
|
platforms = lib.platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
''
|
||||||
|
mkdir -p $out/bin $out/share
|
||||||
|
${lib.optionalString withSDL ''
|
||||||
|
cp ${darkplaces-built}/bin/xonotic-latest-sdl $out/bin/xonotic-latest-sdl
|
||||||
|
chmod +x $out/bin/xonotic-latest-sdl
|
||||||
|
wrapProgram $out/bin/xonotic-latest-sdl \
|
||||||
|
--add-flags "-basedir ${xonotic-data-compiled}" \
|
||||||
|
--add-flags "+vid_dpi 96" \
|
||||||
|
--prefix LD_LIBRARY_PATH : "${darkplaces-built}/lib"
|
||||||
|
ln -sf $out/bin/xonotic-latest-sdl $out/bin/xonotic-latest
|
||||||
|
''}
|
||||||
|
${lib.optionalString withDedicated ''
|
||||||
|
cp ${darkplaces-built}/bin/xonotic-latest-dedicated $out/bin/xonotic-latest-dedicated
|
||||||
|
chmod +x $out/bin/xonotic-latest-dedicated
|
||||||
|
wrapProgram $out/bin/xonotic-latest-dedicated \
|
||||||
|
--add-flags "-basedir ${xonotic-data-compiled}" \
|
||||||
|
--prefix LD_LIBRARY_PATH : "${darkplaces-built}/lib"
|
||||||
|
''}
|
||||||
|
copyDesktopItems
|
||||||
|
''
|
||||||
Reference in New Issue
Block a user