diff --git a/.config/next/init.lisp b/.config/next/init.lisp index 0e10dfad..d93af408 100644 --- a/.config/next/init.lisp +++ b/.config/next/init.lisp @@ -212,3 +212,23 @@ Make sure you understand the security risks associated with this before running this command." (slynk:create-server :port slynk-port :dont-close t) (echo "Slynk server started at port ~a" slynk-port))) + + +(defvar +dev-data-profile+ (make-instance 'data-profile :name "dev") + "Development profile.") + +(defmethod next:expand-data-path ((path data-path) (profile (eql +dev-data-profile+))) + "Persist data to /tmp/next/." + (expand-default-path (make-instance (class-name (class-of path)) + :basename (basename path) + :dirname "/tmp/next/"))) + +(defmethod next:expand-data-path ((path (eql *socket-path*)) (profile (eql +dev-data-profile+))) + "Return path of the socket." + (cond + ((getf *options* :no-socket) + nil) + (t (expand-default-path + (make-instance 'data-path + :basename (or (getf *options* :socket) (basename path)) + :dirname "/tmp/next/")))))