aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2019-08-29 19:12:39 +0200
committerRobert Helgesson <robert@rycee.net>2019-08-29 19:12:39 +0200
commit875eea1330d8847a78dfead2ee26143adc542138 (patch)
tree8fafa08a45682c9e44b126852337141307434b5a /modules
parent7c76ae1814838154a6c99fe481af3191f7258a1a (diff)
systemd: fix unit examples
Closes #823
Diffstat (limited to 'modules')
-rw-r--r--modules/systemd.nix18
1 files changed, 10 insertions, 8 deletions
diff --git a/modules/systemd.nix b/modules/systemd.nix
index 2a67bb31848..cdc4486f542 100644
--- a/modules/systemd.nix
+++ b/modules/systemd.nix
@@ -81,15 +81,17 @@ let
unitExample = type: literalExample ''
{
- Unit = {
- Description = "Example description";
- Documentation = [ "man:example(1)" "man:example(5)" ];
- };
+ ${toLower type}-name = {
+ Unit = {
+ Description = "Example description";
+ Documentation = [ "man:example(1)" "man:example(5)" ];
+ };
- ${type} = {
- …
- };
- }
+ ${type} = {
+ …
+ };
+ }
+ };
'';
sessionVariables = mkIf (cfg.sessionVariables != {}) {