2023-07-08 12:55:04 +00:00
---
title: Project structure
---
= Project structure
2023-08-03 10:11:04 +00:00
Next, we have the project directory — the environment you'll be living in for the next year, tinkering your Nix configs.
2023-07-08 12:55:04 +00:00
It is required to be familiar with the workspace, after all.
2023-07-26 10:05:22 +00:00
My configuration takes a lot of cues from link:{devos-link}[devos] (which is unfortunately is a lot to take if you're just beginning to grok Nix as a whole).
2023-07-08 12:55:04 +00:00
My NixOS config should look like the following:
[source, tree]
----
nixos-config
2024-01-17 09:34:50 +00:00
├── configs/
2023-07-14 12:18:57 +00:00
├── docs/
2023-07-08 12:55:04 +00:00
├── lib/
├── modules/
2023-09-25 10:38:52 +00:00
├── overlays/
2023-07-08 12:55:04 +00:00
├── pkgs/
├── shells/
├── templates/
├── default.nix
├── flake.lock
├── flake.nix
└── README.adoc
----
2023-07-14 12:18:57 +00:00
* `./docs/` contain the source code for the website.
Currently, it uses link:https://gohugo.io/[Hugo] for statically generating the website.
2024-01-17 09:34:50 +00:00
* `./configs/` contain several configurations for several environments including NixOS, home-manager, and flake-parts.
Typically, these are anything that are configured by Nix modules.
2023-07-08 12:55:04 +00:00
2023-07-09 04:15:32 +00:00
* `./modules/` contain my custom modules including NixOS and home-manager modules.
For more information, see the github:{github-repo}[related documentation, path=./modules/README.adoc, rev=master].
2023-07-08 12:55:04 +00:00
2023-09-25 10:38:52 +00:00
* `./overlays/` contain the overlays for several established packages.
This is typically used exclusively for the project and advised to not use it if you're not foodogsquared.
2023-07-09 04:15:32 +00:00
* `./pkgs/` contains my custom packages.
2023-07-08 12:55:04 +00:00
It is exported in the flakes at `outputs.packages` compiled through various systems.
2023-07-09 04:15:32 +00:00
* `./shells/` contains my development shells for interacting with the usual type of projects.
2023-07-08 12:55:04 +00:00
Setting this up can bring benefits outside of NixOS (unless you're interacting with projects with any OpenGL-related stuff).
footnote:[Since packages brought from Nix shells can only work with the store, a container might be better at some situations.]
2023-07-09 04:15:32 +00:00
* `./templates/` contains my custom templates handy for quickly initializing for various types of projects.