File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 33
33
ollama = {
34
34
enable = true ;
35
35
36
- environmentVariables = { OLLAMA_ORIGINS = "app://obsidian.md*" ; } ;
36
+ environmentVariables = {
37
+ OLLAMA_ORIGINS = let origins = [ "app://obsidian.md*" ] ;
38
+ in ( lib . concatStringsSep "," origins ) ;
39
+ } ;
37
40
38
41
acceleration =
39
42
if cfg . amd then "rocm" else if cfg . nvidia then "cuda" else null ;
40
43
} ;
41
44
42
- # disabled until i update nixpkgs
43
- # nextjs-ollama-llm-ui = mkIf cfg.web-ui {
44
- # enable = true ;
45
- # port = 6000 ;
46
- # };
45
+ nextjs-ollama-llm-ui = mkIf cfg . web-ui {
46
+ enable = true ;
47
+ port = 6060 ;
48
+ hostname = "0.0.0.0" ;
49
+ } ;
47
50
} ;
48
51
52
+ # override the service to use the correct binary, until https://github.com/NixOS/nixpkgs/pull/319456 is merged
53
+ systemd . services . nextjs-ollama-llm-ui . serviceConfig . ExecStart =
54
+ lib . mkForce "${ lib . getExe config . services . nextjs-ollama-llm-ui . package } " ;
55
+
49
56
environment . systemPackages = with pkgs ;
50
57
lib . optionals cfg . lmstudio [ lmstudio ] ;
51
58
} ;
You can’t perform that action at this time.
0 commit comments