  (add-hook 'text-mode-hook 'flyspell-mode))
 
 (use-package nix-mode
-  :ensure t)
+  :ensure t
+  :mode "\\.nix\\'")
 
 (use-package ido
   :demand t

;;(package-refresh-contents)

(eval-when-compile
  (require 'use-package))

(require 'bind-key)
(require 'diminish nil t)

(use-package magit :ensure t)

(use-package whitespace
  :diminish (global-whitespace-mode

  :ensure t)

(use-package yaml-mode
  :mode "\\.ya?ml\\'"
  :ensure t)

(use-package markdown-mode
  :ensure t
  :mode (("\\`README\\.md\\'" . gfm-mode)
         ("\\.md\\'"          . markdown-mode)
         ("\\.markdown\\'"    . markdown-mode)))

(use-package paren
  :demand t
  :config
  (show-paren-mode))

(use-package rainbow-delimiters
  :ensure t
