spacemacs/layers/+os/nixos
Arif Er 00f9ab19ac chore: update copyright headers to 2022
The script used to identify and update the change is added into the GitHub
workflows script directory. A workflow action can be created to trigger the
script to update the headers on the first of every new year. Possibly a task for
a consequent PR.
2022-06-03 17:32:20 +02:00
..
img Update NixOS layer banner 2019-10-19 11:55:56 +02:00
README.org [nixos] Fix variable name in README (#15413) 2022-03-17 11:34:53 -04:00
config.el chore: update copyright headers to 2022 2022-06-03 17:32:20 +02:00
funcs.el Add basic LSP support to NixOS layer (#15342) 2022-02-13 20:44:16 +00:00
layers.el Add basic LSP support to NixOS layer (#15342) 2022-02-13 20:44:16 +00:00
packages.el chore: update copyright headers to 2022 2022-06-03 17:32:20 +02:00

README.org

NixOS layer

/TakeV/spacemacs/media/branch/develop/layers/+os/nixos/img/nixos.png

Description

This layer adds tools for better integration of Emacs in NixOS.

Features:

Install

Layer

To use this configuration layer, add it to your ~/.spacemacs. You will need to add nixos to the existing dotspacemacs-configuration-layers list in this file.

Configuration

Enabling LSP (Experimental)

To use the experimental LSP backend, set variable nix-backend to lsp in your ~./spacemacs. (You would also need to enable LSP layer).

  (setq-default dotspacemacs-configuration-layers
                (nixos :variables nix-backend 'lsp))

To install rnix-lsp from nix, run the following command in shell:

  nix-env -i -f https://github.com/nix-community/rnix-lsp/archive/master.tar.gz

Format on save

To enable automatic formatting on save, set the layer variable nixos-format-on-save to t:

  (setq-default dotspacemacs-configuration-layers
                (nixos :variables nixos-format-on-save t))

Opt-out from auto-complete

On some systems, company-nixos-options may be very slow. If this is the case, see the section on disabling the disabling auto-complete for the nixos layer.

Key bindings

NixOS Options

Key binding Description
SPC h > Call helm-nixos-options
SPC m = = Format buffer using nixfmt