From f3dc0b85833c6c9946ad1349ab810d07e0bdf761 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Fri, 19 Jun 2026 16:29:03 -0500 Subject: [PATCH] docs: update platform module guidance Program and service modules are auto-imported now, so contributor docs should point platform-specific work at guarded module behavior and tests instead of loadModule. --- docs/manual/contributing/guidelines.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/manual/contributing/guidelines.md b/docs/manual/contributing/guidelines.md index 197d37868..163d20488 100644 --- a/docs/manual/contributing/guidelines.md +++ b/docs/manual/contributing/guidelines.md @@ -200,9 +200,13 @@ of the supported platforms. The most common example of platform specific modules are those that define systemd user services, which only works on Linux systems. -If you add a module that is platform specific then make sure to include -a condition in the `loadModule` function call. This will make the module -accessible only on systems where the condition evaluates to `true`. +If you add a module that is platform specific then make sure the module +guards platform-specific configuration with an appropriate condition, for +example `pkgs.stdenv.hostPlatform.isLinux` or +`pkgs.stdenv.hostPlatform.isDarwin`. Modules in `modules/programs/` and +`modules/services/` are auto-imported, so the platform condition should live +in the module behavior and in any platform-specific tests rather than in a +separate module discovery call. Similarly, if you are adding a news entry then it should be shown only to users that may find it relevant, see [News](#sec-news) for a