master
Ingolf Wagner 2021-09-05 20:19:32 +02:00
parent a7316f04b3
commit 6374c6ffe8
Signed by: palo
GPG Key ID: 76BF5F1928B9618B
1 changed files with 6 additions and 6 deletions

View File

@ -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")` 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. inside the `dotspacemacs/user-config` function is enough, to make it work.
``` ```nix
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
let 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` . 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. 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 = home.file.".spacemacs.d/hook-user-config.el".text =
let let
all-hies = import (fetchTarball "https://github.com/infinisil/all-hies/tarball/master") {}; 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, If you already installed the `lsp-server` via the `configuration.nix`, this file is not necessary,
but also does not hurt. but also does not hurt.
``` ```nix
{ pkgs ? import <nixpkgs> {} }: { pkgs ? import <nixpkgs> {} }:
let let
all-hies = import (fetchTarball "https://github.com/infinisil/all-hies/tarball/master") {}; 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`. `cabal test` and `cabal build`.
All package files (e.g. `./current-project.nix`) are created by `cabal2nix`. All package files (e.g. `./current-project.nix`) are created by `cabal2nix`.
``` ```nix
{ pkgs ? import <nixpkgs> { { pkgs ? import <nixpkgs> {
overlays = [ overlays = [
(self: super: { (self: super: {
@ -218,7 +218,7 @@ pkgs.haskellPackages.current-project.env
For other scripts and tooling important for development. For other scripts and tooling important for development.
``` ```nix
{ pkgs ? import <nixpkgs> {} }: { pkgs ? import <nixpkgs> {} }:
let let
updateCabal = pkgs.writeShellScriptBin "update-cabal" /* sh */ '' 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 `direnv` and the `direnv-mode` make it possible
to load the environment needed and provided by the `*.nix` files. to load the environment needed and provided by the `*.nix` files.
``` ```shell
use nix ./env.nix use nix ./env.nix
use nix ./lsp.nix use nix ./lsp.nix
use nix ./shell.nix use nix ./shell.nix