From 875eea1330d8847a78dfead2ee26143adc542138 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Thu, 29 Aug 2019 19:12:39 +0200 Subject: [PATCH] systemd: fix unit examples Closes #823 --- modules/systemd.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/modules/systemd.nix b/modules/systemd.nix index 2a67bb31..cdc4486f 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 != {}) {