Skip to content

🔓 anti proxy/firewall setup using git repo mirrors of package archives. (local melpa)

Notifications You must be signed in to change notification settings

ninrod/emacs-antiproxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 

Repository files navigation

Setting up emacs with a local MELPA

  • important note: do check upfront if these procedures are ok within your company’s security policies.
  • This is very useful when you are behind a corporate firewall or a slow proxy or even in a situation where you have no internet connection and want to hack in emacs and want to tweak your configuration.

option 1) @d12frosted elpa mirror

setup

  1. git clone d12frosted’ elpa mirror or just put the repo inside an usb stick and place the repo in the ~/.emacs.d/mirror-elpa folder (use the `–depth 1` option to grab just the last commit):
$ git clone --depth 1 https://github.com/d12frosted/elpa-mirror.git  
  1. place the provided init.el file in ~/.emacs.d.
  2. use the timeless and infinitely powerful editor at will.

init.el

(require 'package)

(setq package-enable-at-startup nil)
(setq package-archives '(("melpa" . "~/.emacs.d/mirror-elpa/melpa/")
                         ("org"   . "~/.emacs.d/mirror-elpa/org/")
                         ("gnu"   . "~/.emacs.d/mirror-elpa/gnu/")))
(package-initialize)

(unless (package-installed-p 'use-package) ; Bootstrap John Wigley's `use-package'
  (package-refresh-contents)
  (package-install 'use-package))

(use-package evil ; this will install evil mode even without an internet connection.
  :ensure t
  :config
  (evil-mode))

advantages

  • You now have unlimited access to all of melpa, elpa and orgmode without having to send/receive a single network packet.
  • this also means that instead of taking minutes do download your 100+ packages, it now takes nanoseconds.

disadvantages

  • You have to rely on @d12frosted to manually update the whole mirror. But he does a very good job at it.

option 2) Redguardtoo’s elpa-mirror

setup

  1. generate your thin-mirror out of your ~/.emacs.d/elpa folder using @redguartoo’s elpa-mirror elpamr-create-mirror-for-installed command.
  2. move this thin generated mirror to ~/.emacs.d/thin-elpa-mirror/

init.el

(require 'package)
(setq package-enable-at-startup nil)
(setq package-archives '(("melpa" . "~/.emacs.d/thin-elpa-mirror/")))
(package-initialize)

(unless (package-installed-p 'use-package) ; Bootstrap John Wigley's `use-package'
  (package-refresh-contents)
  (package-install 'use-package))

(use-package evil ; this will install evil mode even without an internet connection.
  :ensure t
  :config
  (evil-mode))

advantages

  • The advantage is that you don’t have to wait for @d12frosted to update his mirror.

disadvantage

  • The disadvantage is that you are confined to the packages that you use, e.g., you can’t try out new packages.

LICENSE

copyright (C) 2016-2021 - Filipe Correa Lima da Silva Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”.

GNU Free Documentation License - 1.3

About

🔓 anti proxy/firewall setup using git repo mirrors of package archives. (local melpa)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published