okay
This commit is contained in:
parent
0ea02d49f4
commit
2b8d9b8680
1 changed files with 18 additions and 10 deletions
|
@ -95,15 +95,23 @@ Should make startup faster, taken from doom-emacs
|
|||
|
||||
(package-initialize)
|
||||
|
||||
(if (executable-find "nix")
|
||||
(message "skipping use-package install")
|
||||
(else
|
||||
|
||||
(defun get-distro-or-os ()
|
||||
"Return the Linux distribution or OS Emacs is running on."
|
||||
(if (eq system-type 'darwin)
|
||||
"Darwin"
|
||||
(when (eq system-type 'gnu/linux)
|
||||
(if (file-exists-p "/etc/os-release")
|
||||
(substring (shell-command-to-string "source /etc/os-release && echo $NAME") 0 -1)
|
||||
(substring (car (cdr (process-exit-code-and-output "uname" "-o"))) 0 -1)))))
|
||||
|
||||
(let (os-name (get-distro-or-os))
|
||||
(if (string= os-name "NixOS")
|
||||
(message "skipping use-package installation")
|
||||
(unless (package-installed-p 'use-package)
|
||||
(progn
|
||||
(package-refresh-contents)
|
||||
(package-install 'use-package)))
|
||||
))
|
||||
|
||||
(package-install 'use-package)))))
|
||||
(require 'use-package)
|
||||
(setq use-package-always-ensure t)
|
||||
#+end_src
|
||||
|
|
Loading…
Reference in a new issue