user/marvin.nix (view raw)
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 | { config, pkgs, ... }: { imports = [ ./settings/base.nix ./settings/development/base.nix ./settings/development/javascript.nix ./settings/development/golang.nix ./settings/development/web.nix ./settings/darwin.nix ./settings/emacs.nix ./settings/fish.nix ./settings/git.nix ./settings/nixpkgs.nix ./settings/ssh.nix ./settings/tabnine.nix ./settings/user-interface.nix ./settings/nix.nix ]; home.username = "alan"; home.homeDirectory = "/Users/alan"; home.stateVersion = "22.11"; home.sessionPath = [ "$HOME/.cache/lm-studio/bin" ]; home.packages = with pkgs; [ picocom ollama ]; launchd.agents = { ollama = { enable = true; config = { ProgramArguments = [ "/Users/alan/.local/state/nix/profile/bin/ollama" "serve" ]; RunAtLoad = true; KeepAlive = true; WorkingDirectory = "/Users/alan"; EnvironmentVariables = { OLLAMA_KEEP_ALIVE = "-1"; # keep models in memory forever OLLAMA_FLASH_ATTENTION = "1"; # significantly reduce memory usage as the context size grows }; }; }; ollama-preload = { enable = true; config = { ProgramArguments = [ "/Users/alan/.local/state/nix/profile/bin/ollama" "run" "llama3.3" "" ]; RunAtLoad = true; KeepAlive = false; WorkingDirectory = "/Users/alan"; }; }; }; launchd.agents.colima = { enable = true; config = { ProgramArguments = [ "/Users/alan/.local/state/nix/profile/bin/colima" "start" ]; RunAtLoad = true; # It doesn't run in the foreground, yet... # KeepAlive = true; WorkingDirectory = "/Users/alan"; StandardOutPath = "/Users/alan/Library/Logs/colima.log"; StandardErrorPath = "/Users/alan/Library/Logs/colima.log"; EnvironmentVariables = { HOME = "/Users/alan"; XDG_CONFIG_HOME = config.xdg.configHome; }; }; }; } |