From 9001de6a2070dc3809f98ab62082ec1cebfb34f2 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 17 Mar 2016 21:46:45 -0700 Subject: [PATCH] tweak secure settings --- dotfiles/emacs.d/init.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index c8d3d788..cf1b52c9 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -60,7 +60,7 @@ ;; Security ;; ============================================================================= -(defvar imalison:secure t) +(defvar imalison:secure nil) (defun imalison:use-https-and-tls () (setq tls-checktrust t) @@ -99,11 +99,15 @@ ;; ============================================================================= (require 'package) +(defvar imalison:elpa-protocol (if imalison:secure "https" "http")) ;; (add-to-list 'package-archives ;; '("marmalade" . "http://marmalade-repo.org/packages/") t) -;; (add-to-list 'package-archives '("elpa" . "https://tromey.com/elpa/") t) -;; (add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t) -(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) +(add-to-list 'package-archives '("elpa" . (concat imalison:elpa-protocol + "://tromey.com/elpa/")) t) +(add-to-list 'package-archives '("org" . (concat imalison:elpa-protocol + "://orgmode.org/elpa/")) t) +(add-to-list 'package-archives '("melpa" . (concat imalison:elpa-protocol + "://melpa.org/packages/")) t) (defun ensure-packages-installed (packages) (unless package-archive-contents