summary refs log tree commit diff
path: root/config/init-nix.el
diff options
context:
space:
mode:
Diffstat (limited to 'config/init-nix.el')
-rw-r--r--config/init-nix.el19
1 files changed, 19 insertions, 0 deletions
diff --git a/config/init-nix.el b/config/init-nix.el
new file mode 100644
index 0000000..d0e50c7
--- /dev/null
+++ b/config/init-nix.el
@@ -0,0 +1,19 @@
+;;; init-nix.el --- Configure nix -*- lexical-binding: t -*-
+;; Author: Franck Cuny <franck@fcuny.net>
+
+;;; Commentary:
+
+;; All nix related things
+
+;;; Code:
+
+(use-package nix-mode
+  :ensure t
+  :hook ((nix-mode . eglot-ensure)
+         (nix-mode . (lambda () (add-hook 'before-save-hook 'eglot-format-buffer nil t))))
+  :custom
+  (nix-indent-function 'nix-indent-line))
+
+(provide 'init-nix)
+
+;;; init-nix.el ends here