summaryrefslogtreecommitdiff
path: root/nixos/docs
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/docs')
-rw-r--r--nixos/docs/ADDING_PACKAGES.md59
1 files changed, 53 insertions, 6 deletions
diff --git a/nixos/docs/ADDING_PACKAGES.md b/nixos/docs/ADDING_PACKAGES.md
index fa5ea02..d1b5eba 100644
--- a/nixos/docs/ADDING_PACKAGES.md
+++ b/nixos/docs/ADDING_PACKAGES.md
@@ -1,10 +1,11 @@
# Dendritic Pattern
-Dendritic is the way to organize your packages in NixOS -- around features. https://github.com/mightyiam/dendritic this is a good example!
+
+Dendritic is the way to organize your packages in NixOS — around features. https://github.com/mightyiam/dendritic this is a good example!
# Adding Packages
This configuration is composed from `hosts/opus/default.nix` and focused modules
-under `modules/system/` and `modules/features/`. There is no central package list.
+under `modules/features/`. There is no central package list.
## Where a package belongs
@@ -13,15 +14,23 @@ under `modules/system/` and `modules/features/`. There is no central package lis
| Terminal | `modules/features/terminals/default.nix` |
| CLI tool (incl. shell prompts like starship) | `modules/features/cli-tools/default.nix` |
| Editor or IDE | `modules/features/editors/default.nix` |
-| Desktop application | `modules/features/desktop-apps/default.nix` |
| Compiler, linter, language tool | `modules/features/dev-tools/default.nix` |
| File manager or archive tool (incl. drag & drop tools) | `modules/features/file-managers/default.nix` |
| Wayland clipboard, screenshot, or input tool | `modules/features/wayland-tools/default.nix` |
| Audio application | `modules/features/audio-tools/default.nix` |
+| Media recording or streaming tool | `modules/features/media-tools/default.nix` |
| System monitor or fetch tool | `modules/features/monitoring/default.nix` |
| Font | `modules/features/fonts/default.nix` |
| GStreamer plugin | `modules/features/gst-codecs/default.nix` |
| Runtime library for external binaries | `modules/features/binary-compat/default.nix` |
+| Web browser | `modules/features/browsers/default.nix` |
+| Messaging or communication app | `modules/features/messaging/default.nix` |
+| Office suite, note-taking app, or document viewer/editor | `modules/features/productivity/default.nix` |
+| Password manager or encryption tool | `modules/features/security/default.nix` |
+| Gaming app, game launcher, or gaming service (Steam, etc.) | `modules/features/gaming/default.nix` |
+| P2P or torrent client | `modules/features/p2p/default.nix` |
+| Language dictionary or spell-check data | `modules/features/language-tools/default.nix` |
+| Desktop application (catch-all for GUI apps without a fitting category) | `modules/features/desktop-apps/default.nix` |
First use an existing category. Create a new feature module only if the package is
its own service, subsystem, or a group of related packages without a fitting category.
@@ -63,6 +72,44 @@ fonts.packages = with pkgs; [
];
```
+## Language dictionaries are different
+
+Spell-check dictionaries, transliteration data, and other language data belong in
+`modules/features/language-tools/default.nix` under `environment.systemPackages`, not
+in `fonts.packages` or a general-purpose module:
+
+```nix
+{ pkgs, ... }:
+
+{
+ environment.systemPackages = with pkgs; [
+ hunspellDicts.ru_RU
+ ];
+}
+```
+
+## Gaming services live in the gaming module
+
+Gaming-related services and packages — Steam configuration, game launchers, Wine-based
+app runners — belong in `modules/features/gaming/default.nix`. This keeps the host file
+lean and makes the gaming stack reusable across hosts:
+
+```nix
+{ pkgs, ... }:
+
+{
+ programs.steam = {
+ enable = true;
+ remotePlay.openFirewall = true;
+ };
+
+ environment.systemPackages = with pkgs; [
+ pkgs.lutris
+ pkgs.prismlauncher
+ ];
+}
+```
+
## Create a new feature module
1. Create `modules/features/<category>/default.nix`:
@@ -89,13 +136,13 @@ fonts.packages = with pkgs; [
## Host-only packages
For a package that is truly specific to this desktop, add it to the small
-`environment.systemPackages` list in `hosts/opus/default.nix`. Gaming is the current
-example. If that list starts to represent a reusable category, extract a feature module.
+`environment.systemPackages` list in `hosts/opus/default.nix`. If that list starts to
+represent a reusable category, extract a feature module.
## Packages from flake inputs
Packages provided by a flake input use `inputs` and the host platform, following
-`modules/features/desktop-apps/default.nix`:
+`modules/features/browsers/default.nix`:
```nix
{ pkgs, inputs, ... }: