-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfiguration.nix
80 lines (75 loc) · 1.92 KB
/
configuration.nix
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
{ config, flake, machine-name, pkgs, ... }:
let
hostname = "pluto";
common = import ../common.nix { inherit config flake machine-name pkgs; };
configPath = "/Users/jacobi/cfg/hosts/${hostname}/configuration.nix";
username = "jacobi";
in
{
imports = [
"${common.home-manager}/nix-darwin"
"${common.nix-darwin}/modules/security/pam.nix"
];
home-manager.users.jacobi = common.jacobi;
documentation.enable = false;
security.pam.enableSudoTouchIdAuth = true;
time.timeZone = common.timeZone;
environment.variables = {
NIX_HOST = hostname;
NIXDARWIN_CONFIG = configPath;
};
environment.darwinConfig = configPath;
users.users.jacobi = {
name = username;
home = "/Users/${username}";
openssh.authorizedKeys.keys = with common.pubkeys; [
galaxyboss
milkyway
];
};
system.stateVersion = 4;
nix = common.nix // {
nixPath = [
"darwin=${common.nix-darwin}"
"darwin-config=${configPath}"
];
settings = {
trusted-users = [ "root" "jacobi" ];
};
};
# services.llama-server.servers.llama3 = {
# enable = false;
# port = 8012;
# model = "/opt/box/models/Llama-3.2-3B-Instruct-Q8_0.gguf";
# ngl = 41;
# };
services =
let
modelPath = name: "/opt/box/models/${name}";
in
{
infinity.enable = true;
koboldcpp.servers = {
minicpm = {
enable = true;
port = 5001;
model = modelPath "MiniCPM-V-2_6-Q8_0.gguf";
mmproj = modelPath "mmproj-MiniCPM-V-2_6-f16.gguf";
gpulayers = -1;
};
};
llama-server.servers = {
llama3 = {
enable = true;
port = 8012;
model = modelPath "Llama-3.2-3B-Instruct-Q8_0.gguf";
};
qwen-25-coder-7b = {
enable = true;
port = 8014;
model = modelPath "Qwen2.5.1-Coder-7B-Instruct-Q6_K_L.gguf";
ngl = 81;
};
};
};
}