nix/README.md

60 lines
2 KiB
Markdown
Raw Normal View History

2022-01-28 14:25:41 +00:00
# Mr Hedgehog's Nix Config
2022-01-28 14:25:01 +00:00
2022-01-28 14:25:41 +00:00
## Welcome to my ~
2022-01-28 14:25:01 +00:00
2022-01-28 14:25:41 +00:00
This is a nix config, created with the _[literate programming](https://en.wikipedia.org/wiki/Literate_programming)_ technique. It uses the [md-tangle](https://github.com/joakimmj/md-tangle) tool and all the files in this directory to achive that.
2022-01-28 14:25:01 +00:00
2022-01-28 14:25:41 +00:00
The main goal of _literate programming_ is to make it so documentation **never** seperates from code. That's why I am doing my config like this.
2022-01-28 14:25:01 +00:00
2022-01-28 14:25:41 +00:00
Another reason to do this is because of the strangeness of the **nix** configuration language that I use.
2022-01-28 14:25:01 +00:00
2022-01-28 14:25:41 +00:00
All this is to say that I believe that literate programming is amazing, and that everyone should use it, as it emphasizes good documentation.
2022-01-28 14:25:01 +00:00
2022-01-28 14:25:41 +00:00
## Directory Structure
2022-01-28 14:25:01 +00:00
2022-01-28 14:25:41 +00:00
When I refer to a .nix file, You will find it under the same filename, but with a .md extension instead. So home.nix refers to the home.md file, which is then tangled into the home.nix file. I include the generated nix files in this repository **only** for the purpose of bootstrapping my config, and not as a single source of truth.
2022-01-28 14:25:01 +00:00
2022-01-28 14:25:41 +00:00
Many other files are also tangled, like my non-nix configs.
2022-01-28 14:25:01 +00:00
2022-01-28 14:25:41 +00:00
```text
/
|
|- cachix
| |- This is my folder for importing nix binary caches
| |- It includes a default.nix so that I can import it, and 1 file per cache.
|
|- config
| |- Contains all of my non-nix config files
| |- As well as any nix config files that are too long to include in home.nix
|
|- hosts
| |- Per-machine configuration
| |- zaphod.nix
| | |- My laptop's configuration
|
|- nix
| |- Just some general nix configuration
| |- nix.conf
| | |- Nix's config file.
|
|- pkgs
| |- Custom packages that get imported into the nixpkgs tree at runtime.
|
|- users
| |- Per-user config.
| |- mrhedgehog.nix
| | |- My personal config
| |- root.nix
| | |- Root user configuration
```
2022-01-28 14:25:01 +00:00
2022-01-28 14:25:41 +00:00
## Useful Resources I've found
2022-01-28 14:25:01 +00:00
2022-01-28 14:25:41 +00:00
### The Unofficial NixOS Wiki
<https://nixos.wiki>
2022-01-28 14:25:01 +00:00
2022-01-28 14:25:41 +00:00
Probably one of the most helpful sites around, as it contains a wealth of information on many things nix-related, as well as info on the ecosystem itself.