Skip to content

Commit 4b05587

Browse files
committed
misc: update README
1 parent 6193695 commit 4b05587

1 file changed

Lines changed: 12 additions & 46 deletions

File tree

README.md

Lines changed: 12 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ Opinionated flake for development of various things I work on using multiple lan
66

77
## Workflow
88

9-
This flake is intended to fit with my workflow, which is with [Visual Studio Code](https://code.visualstudio.com), NixOS and direnv. This project is not intended to be a replacement or alternative to excellent projects such as direnv, devenv, devshell, lorri etc. The flake setups up a reproducible development environment for different programming contexts, and aims to be as declarative as possible whilst allowing some flexibility.
9+
This flake is intended to fit with my workflow, which is with [Visual Studio Code](https://code.visualstudio.com), NixOS and direnv. This project is not intended to be a replacement or alternative to excellent projects such as direnv, devenv, devshell, lorri etc. The flake creates reproducible development environments for various programming contexts, and aims to balance configurability and opinion.
1010

1111

1212
## Features
1313

1414
- Based off `direnv`, nix flakes and `devshell` for portable, easy, reproducible development environments.
15-
- Editor integration, with first-class support for Visual Studio Code/VSCodium (extensions permitting).
15+
- Direct editor integration, with first-class support for Visual Studio Code/VSCodium (extensions permitting).
1616
- Formatting support either with `treefmt-nix` or standard config files
1717
- Configurable and extensible language support via the module system:
1818
- Languages which allow any number of includes/extra packages are (semi)-automatically added with the creation of a file!
19-
- `C/C++` GCC or Clang/LLVM C/C++ development environment with options for build systems, libraries and includes.
20-
- `Python` with the option to use [uv](https://docs.astral.sh/uv/).
21-
- `Node/JS/TS` with options for [corepack](https://github.com/nodejs/corepack), [asdf](https://asdf-vm.com/) and package manager configuration for [pnpm](https://pnpm.io/) and [yarn](https://yarnpkg.com).
22-
- `Fortran` support with `gfortran`, enabling debugger and the `fortls` language server with [Modern Fortran](https://marketplace.visualstudio.com/items?itemName=fortran-lang.linter-gfortran).
23-
- Reproducible LaTeX environment with support for [LTeX+](https://ltex-plus.github.io/ltex-plus/index.html).
24-
- `Typst` with [tinymist](https://myriad-dreamin.github.io/tinymist/introduction.html)
19+
- `C/C++` GCC or Clang/LLVM C/C++ development environment with options for build systems, libraries and includes
20+
- `Python` with the option to use [uv](https://docs.astral.sh/uv/)
21+
- `Node/JS/TS` with options for [corepack](https://github.com/nodejs/corepack), [asdf](https://asdf-vm.com/) and package manager configuration for [pnpm](https://pnpm.io/) and [yarn](https://yarnpkg.com)
22+
- `Fortran` support with `gfortran`, enabling debugger and the `fortls` language server with [Modern Fortran](https://marketplace.visualstudio.com/items?itemName=fortran-lang.linter-gfortran)
23+
- $\LaTeX$ environment with support for [LTeX+](https://ltex-plus.github.io/ltex-plus/index.html)
24+
- `Typst` with [tinymist](https://myriad-dreamin.github.io/tinymist/introduction.html) and `typstyle`
2525

2626
<!-- - Setting up local `settings.json` for VSCode (WIP). -->
2727
## Usage
@@ -30,10 +30,10 @@ To minimise clutter in projects, the majority of configuration is done inside a
3030

3131
0. Have `direnv` installed and that it is hooked into your shell. Have flakes enabled via some mechanism with the flag `experimental-features = nix-command flakes` e.g. in `nix.conf`.
3232
1. Either click `Use this template` on GitHub and follow the instructions, or in a new repository, run `nix flake init -t github:chpxu/development-flake#default`.
33-
2. In `config.nzix`, define your available programming contexts, e.g.
33+
2. In `config.nix`, define your available programming contexts, e.g.
3434
```nix
3535
# config.nix
36-
{pkgs, ...}: {
36+
_: {
3737
languages = {
3838
# For each language inside nix/languages, a corresponding language.enable will exist!
3939
python = {
@@ -79,7 +79,7 @@ The following commands are now available!
7979

8080
## Extending devflake
8181

82-
Currently, devflake supports C, C++, Fortran, JS/TS, LaTeX, Python and Nix. You may use other languages than these, use packages that aren't available in nixpkgs or otherwise. This flake imports `nixos-unstable` and `nixpkgs-25.05` (mainly for some older LLVM/GCC packages). Extension can be done via traditional overlays or adding files into `/nix`.
82+
Currently, devflake supports C, C++, Fortran, JS/TS, LaTeX, Python, Typst and Nix. You may use other languages than these and/or use packages that aren't available in nixpkgs or otherwise. This flake imports `nixos-unstable` and `nixpkgs-25.05` (mainly for some older LLVM/GCC packages). Extension can be done via traditional overlays or configuring files in `/nix`.
8383

8484
### Overlays
8585
Overlays are applied on top of the **unstable** nixpkgs input only. This can be done by editing the file `overlays/default.nix`, for example to modify `ripgrep`, the file could look like this:
@@ -92,7 +92,7 @@ final: prev: {
9292
# Your other overlays ...
9393
}
9494
```
95-
Note that overlays will most certainly trigger a package rebuild. If you attempting to modify a really big package, consider whether you really need to.
95+
Note that overlays will most certainly trigger a package rebuild. If you attempting to modify a really big package, consider whether you really need to. [`flake-parts` does not recommend overlays](https://flake.parts/options/flake-parts-easyoverlay) but I have provided the basic support for those who need it.
9696

9797
### Including other languages
9898

@@ -167,36 +167,6 @@ This is to stop the flake from breaking (it automatically assumes these files ex
167167
### Non nixpkgs software
168168

169169
You should follow the instructions to construct a package for your software, e.g. use `pkgs.python3.pkgs.buildPythonPackage`, or `stdenv.mkDerivation`. You should then add your package into the respective language's `packages` attribute (or inside the `python3.withPackages` call for Python).
170-
<!-- The `nix` folder structure looks something like this:
171-
```
172-
.
173-
└── nix/
174-
├── default.nix
175-
├── languages/
176-
│ ├── c/
177-
│ │ ├── c.nix
178-
│ │ └── # other c/c++ configuration files
179-
│ ├── python/
180-
│ │ ├── python.nix
181-
│ │ └── # other python configuration files
182-
│ ├── js/
183-
│ │ ├── js.nix
184-
│ │ └── # other js configuration files
185-
│ └── # other languages
186-
├── overlays/
187-
│ └── default.nix
188-
└── misc/
189-
├── write_vscode_settings.nix
190-
├── helper.nix
191-
└── # other files
192-
```
193-
194-
- `default.nix` is the file which imports and includes everything from all the other files and sets up package configuration, shellHook, vscode configuration etc. This file is then included inside `flake.nix` to be consumed by `devShells`.
195-
- `packages/<language>` folders contain nix files that detail the relevant packages to be installed.
196-
- `overlays` folder contains, well, any overlays you might want to use.
197-
- For example, configuring python311 to `enableOptimisations` and disable `reproducibleBuild` for potential speedups
198-
- `misc` folder contains any general functions written to be used across the project (`helper.nix`), and any configuration that does not directly impact the shell itself (e.g. editor settings). -->
199-
200170
## Editor/IDE Integration
201171

202172
Currently this is WIP, and my main goal is making sure this flake works well with VSCode.
@@ -231,16 +201,12 @@ STATUS: parity with stable.
231201

232202
Launching emacs from the directory of the project, after direnv has loaded, should hopefully make it pick up the right environment variables.
233203

234-
235-
STATUS: parity with stable.
236-
237204
## Contributing
238205

239206
Thanks for viewing this repo!
240207

241208
I don't really use anything other than NixOS and VSCode. I do not develop on Windows or Mac (even though I've enabled support for `x86_64-darwin`, this is because I expect it to function pretty much the same). Extending the flake to cope with some other editors or platforms would be greatly appreciated and would help a bunch of others if they ever happen to come across this flake and find it useful :pray:.
242209

243-
244210
To contribute, please look at [extending-devflake](#extending-devflake).
245211

246212
## Other niceties

0 commit comments

Comments
 (0)