This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+os/nixos/packages.el

53 lines
1.4 KiB
EmacsLisp
Raw Normal View History

;;; packages.el --- NixOS Layer packages File for Spacemacs
;;
;; Copyright (c) 2015-2020 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defconst nixos-packages
'((company-nixos-options :requires company)
flycheck
(helm-nixos-options :requires helm)
nix-mode
nixos-options))
(defun nixos/post-init-company ()
(let ((backends '(company-capf)))
(when (configuration-layer/package-used-p 'company-nixos-options)
(add-to-list 'backends 'company-nixos-options t))
(eval `(spacemacs|add-company-backends
:backends ,backends
:modes nix-mode))))
(defun nixos/init-company-nixos-options ()
(use-package company-nixos-options
:defer t))
(defun nixos/init-helm-nixos-options ()
(use-package helm-nixos-options
:defer t
2017-04-25 15:24:27 +00:00
:init
(progn
(spacemacs/set-leader-keys
"h>" 'helm-nixos-options))))
2015-07-20 20:11:08 +00:00
(defun nixos/init-nix-mode ()
(use-package nix-mode
:defer t
2018-08-12 14:48:33 +00:00
:mode "\\.nix\\'"
:init
(add-to-list 'spacemacs-indent-sensitive-modes 'nix-mode)
:config
(electric-indent-mode -1)))
2015-07-20 20:11:08 +00:00
(defun nixos/init-nixos-options ()
(use-package nixos-options :defer t))
(defun nixos/post-init-flycheck ()
(spacemacs/enable-flycheck 'nix-mode))