nix code
parent
a7316f04b3
commit
6374c6ffe8
|
@ -39,7 +39,7 @@ to configure files in `~/.spacemacs.d/` and `load` them in
|
|||
the configuration functions inside `~/.spacemacs`. A simple `(load "~/.spacemacs.d/hook-user-config.el")`
|
||||
inside the `dotspacemacs/user-config` function is enough, to make it work.
|
||||
|
||||
```
|
||||
```nix
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
|
||||
|
@ -149,7 +149,7 @@ If you don't like that just use the snippet from the next section.
|
|||
You can install the `lsp` (in our case `hie-wrapper`) globally in your `configuration.nix` .
|
||||
I usually do this in my projects (via `lsp.nix`). Here is the part that differs.
|
||||
|
||||
```
|
||||
```nix
|
||||
home.file.".spacemacs.d/hook-user-config.el".text =
|
||||
let
|
||||
all-hies = import (fetchTarball "https://github.com/infinisil/all-hies/tarball/master") {};
|
||||
|
@ -177,7 +177,7 @@ This file is to setup the `lsp-server`.
|
|||
If you already installed the `lsp-server` via the `configuration.nix`, this file is not necessary,
|
||||
but also does not hurt.
|
||||
|
||||
```
|
||||
```nix
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
let
|
||||
all-hies = import (fetchTarball "https://github.com/infinisil/all-hies/tarball/master") {};
|
||||
|
@ -199,7 +199,7 @@ Provides the environment to run
|
|||
`cabal test` and `cabal build`.
|
||||
All package files (e.g. `./current-project.nix`) are created by `cabal2nix`.
|
||||
|
||||
```
|
||||
```nix
|
||||
{ pkgs ? import <nixpkgs> {
|
||||
overlays = [
|
||||
(self: super: {
|
||||
|
@ -218,7 +218,7 @@ pkgs.haskellPackages.current-project.env
|
|||
|
||||
For other scripts and tooling important for development.
|
||||
|
||||
```
|
||||
```nix
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
let
|
||||
updateCabal = pkgs.writeShellScriptBin "update-cabal" /* sh */ ''
|
||||
|
@ -242,7 +242,7 @@ finally we need a `direnv` configuration file.
|
|||
`direnv` and the `direnv-mode` make it possible
|
||||
to load the environment needed and provided by the `*.nix` files.
|
||||
|
||||
```
|
||||
```shell
|
||||
use nix ./env.nix
|
||||
use nix ./lsp.nix
|
||||
use nix ./shell.nix
|
||||
|
|
Loading…
Reference in New Issue