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

  :config
  (ido-mode))

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

;; (use-package ruby-mode
;;   :ensure t
;;   :config (progn
;;             (setq ruby-deep-indent-paren-style nil)
;;             (use-package inf-ruby :ensure t))
;;   :init (defun ruby-send-whole-buffer ()
;;           (interactive)
;;           (save-buffer)
;;           (ruby-load-file (buffer-file-name (current-buffer))))
;;   :bind (("C-M-l" . ruby-forward-sexp)
;;          ("C-M-j" . ruby-backward-sexp)
;;          ("C-x e" . ruby-send-whole-buffer)
;;          ("C-x C-e" . ruby-send-whole-buffer)))

(use-package ruby-mode
  :mode "\\.rb\\'"
  :interpreter "ruby"
  :config
  (defun my-ruby-mode-hook ()
    (require 'inf-ruby))

  (add-hook 'ruby-mode-hook 'my-ruby-mode-hook))

;; Customizations
(setq custom-file (expand-file-name "custom-file" user-emacs-directory))

;;(package-refresh-contents)

(eval-when-compile
  (defvar use-package-verbose t)
  (require 'use-package))

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

(use-package
  magit
  :ensure t
  :bind ("M-C M" . magit-status))

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