Skip to content

Commit 4a43eec

Browse files
authored
docs(custom-service): Fix multi-instance example (#469)
resolves #458
1 parent 65c47ee commit 4a43eec

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

doc/custom-service.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ Let's write the same `hello` service as above, in `hello.nix`, but this time as
8989
{ config, lib, name, pkgs, ... }:
9090
{
9191
options = {
92-
enable = lib.mkEnableOption "Enable ${name} service";
9392
package = lib.mkPackageOption pkgs "hello" { };
9493
message = lib.mkOption {
9594
type = lib.types.str;
@@ -111,7 +110,7 @@ The primary differences from the single instance service are:
111110

112111
- The module now takes an additional argument `name`, which is the name of the instance of the service.
113112
- We no longer have to write the `config` block, as it is now handled by the library by importing the `outputs.settings` option.
114-
- And we don't have to write `options.services."${name}"`, as that is abstracted away by the library.
113+
- And we don't have to write `options.services."${name}"` or define `enable` and `dataDir` options, as that is abstracted away by the library.
115114

116115
Now that we have defined the multi-instance service, we can import it in our flake:
117116

0 commit comments

Comments
 (0)