store_linux.go 298 B

12345678910111213141516
  1. package store
  2. import (
  3. "os"
  4. "path/filepath"
  5. )
  6. func getStorePath() string {
  7. if os.Geteuid() == 0 {
  8. // TODO where should we store this on linux for system-wide operation?
  9. return "/etc/ollama/config.json"
  10. }
  11. home := os.Getenv("HOME")
  12. return filepath.Join(home, ".ollama", "config.json")
  13. }