2018-07-17 13:23:33 +02:00
|
|
|
;;; lang/nix/config.el -*- lexical-binding: t; -*-
|
2018-07-17 09:56:52 +02:00
|
|
|
|
2020-10-15 15:57:33 -04:00
|
|
|
(after! tramp
|
|
|
|
(add-to-list 'tramp-remote-path "/run/current-system/sw/bin"))
|
|
|
|
|
|
|
|
|
|
|
|
;;
|
|
|
|
;;; Plugins
|
|
|
|
|
2019-07-23 12:44:03 +02:00
|
|
|
(use-package! nix-mode
|
2020-04-14 15:37:11 -04:00
|
|
|
:interpreter ("\\(?:cached-\\)?nix-shell" . +nix-shell-init-mode)
|
2018-08-13 16:07:10 +02:00
|
|
|
:mode "\\.nix\\'"
|
|
|
|
:config
|
2020-08-20 02:29:56 -04:00
|
|
|
(set-repl-handler! 'nix-mode #'+nix/open-repl)
|
2018-07-17 13:23:33 +02:00
|
|
|
(set-company-backend! 'nix-mode 'company-nixos-options)
|
2019-09-21 13:54:30 -04:00
|
|
|
(set-lookup-handlers! 'nix-mode
|
|
|
|
:documentation '(+nix/lookup-option :async t))
|
2020-10-05 17:10:53 -04:00
|
|
|
(set-popup-rule! "^\\*nixos-options-doc\\*$" :ttl 0 :quit t)
|
2018-08-13 16:07:10 +02:00
|
|
|
|
2018-12-23 23:54:27 -05:00
|
|
|
(map! :localleader
|
|
|
|
:map nix-mode-map
|
|
|
|
"f" #'nix-update-fetch
|
|
|
|
"p" #'nix-format-buffer
|
|
|
|
"r" #'nix-repl-show
|
|
|
|
"s" #'nix-shell
|
|
|
|
"b" #'nix-build
|
|
|
|
"u" #'nix-unpack
|
2019-09-21 13:54:30 -04:00
|
|
|
"o" #'+nix/lookup-option))
|
2018-07-17 09:56:52 +02:00
|
|
|
|
2019-07-23 12:44:03 +02:00
|
|
|
(use-package! nix-drv-mode
|
2018-08-13 16:07:10 +02:00
|
|
|
:mode "\\.drv\\'")
|
|
|
|
|
2019-07-23 12:44:03 +02:00
|
|
|
(use-package! nix-update
|
2018-08-13 16:07:10 +02:00
|
|
|
:commands nix-update-fetch)
|
2018-07-17 09:56:52 +02:00
|
|
|
|
2019-07-23 12:44:03 +02:00
|
|
|
(use-package! nix-repl
|
2018-08-13 16:07:10 +02:00
|
|
|
:commands nix-repl-show)
|