From fed181fac11b376fc242c4805b91d852902fbc35 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Tue, 5 Aug 2025 17:08:25 +0200 Subject: [PATCH] nixos/doc/modular-services: run nixfmt on code blocks --- nixos/doc/manual/development/modular-services.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/nixos/doc/manual/development/modular-services.md b/nixos/doc/manual/development/modular-services.md index eadead5c4a40..c34871f7725f 100644 --- a/nixos/doc/manual/development/modular-services.md +++ b/nixos/doc/manual/development/modular-services.md @@ -45,11 +45,18 @@ So note that the default value of `system.services.` is not a complete ser It is possible to write service modules that are portable. This is done by either avoiding the `systemd` option tree, or by defining process-manager-specific definitions in an optional way: ```nix -{ config, options, lib, ... }: { +{ + config, + options, + lib, + ... +}: +{ _class = "service"; config = { process.argv = [ (lib.getExe config.foo.program) ]; - } // lib.optionalAttrs (options?systemd) { + } + // lib.optionalAttrs (options ? systemd) { # ... systemd-specific definitions ... }; }