-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
80 lines (80 loc) · 2.74 KB
/
Copy pathdefault.nix
File metadata and controls
80 lines (80 loc) · 2.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# default.nix - classic, non-Flake entrypoint for Codegeist OS builds.
#
# The entrypoint exposes an x86_64 GNOME installer that downloads one GGUF into
# the installed target. A native llama.cpp server exposes that model through a
# loopback OpenAI-compatible API. The payload remains absent from the ISO closure.
let
artifacts = import ./nix/artifacts.nix;
nixpkgs = builtins.fetchTarball artifacts.nixpkgs;
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
modelArtifact = artifacts.models.codegeistLlm;
codegeist = pkgs.callPackage ./nix/packages/codegeist-cli.nix {
artifact = artifacts.codegeist.${system};
};
targetLlamaServerModule = pkgs.writeText "codegeist-installer-llama-server.nix"
(builtins.readFile ./nix/modules/installer-llama-server.nix);
geist = pkgs.callPackage ./nix/packages/geist.nix {
inherit codegeist;
};
targetInstallationDependencies = [
targetLlamaServerModule
geist
pkgs.llama-cpp
];
geistWrapperTest = import ./nix/tests/geist-wrapper.nix { inherit pkgs; };
commonModules = [
./nix/modules/base.nix
./nix/modules/identities.nix
(import ./nix/modules/codegeist.nix { package = codegeist; })
];
mkVmSystem = profile:
import "${nixpkgs}/nixos/lib/eval-config.nix" {
inherit system;
modules = [
"${nixpkgs}/nixos/modules/virtualisation/build-vm.nix"
profile
] ++ commonModules;
};
vmSystem = mkVmSystem ./nix/profiles/x86_64-vm.nix;
vmVncSystem = mkVmSystem ./nix/profiles/x86_64-vm-vnc.nix;
installIsoSystem =
import "${nixpkgs}/nixos/lib/eval-config.nix" {
inherit system;
modules = [
{
_module.args = {
inherit
geist
modelArtifact
targetInstallationDependencies
targetLlamaServerModule
;
};
}
./nix/profiles/x86_64-install-iso.nix
];
};
installIso = installIsoSystem.config.system.build.isoImage;
installerTest = pkgs.testers.runNixOSTest (
import ./nix/tests/installer.nix {
inherit pkgs installIso;
}
);
in
{
packages.x86_64.codegeist = codegeist;
packages.x86_64.geist = geist;
images.x86_64.vm = vmSystem.config.system.build.vmWithBootLoader;
images.x86_64.vmVnc = vmVncSystem.config.system.build.vmWithBootLoader;
images.x86_64.iso = installIso;
tests.x86_64.bootstrap = pkgs.testers.runNixOSTest (
import ./nix/tests/bootstrap.nix {
inherit codegeist commonModules;
}
);
tests.x86_64.geistWrapper = geistWrapperTest;
# Run this driver through task test-installer, outside the Nix sandbox, so the
# guest can use the production model URL during Calamares installation.
tests.x86_64.installerDriver = installerTest.driver;
}