about summary refs log tree commit diff
path: root/nixos/modules/system/boot/systemd/user.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/system/boot/systemd/user.nix')
-rw-r--r--nixos/modules/system/boot/systemd/user.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/systemd/user.nix b/nixos/modules/system/boot/systemd/user.nix
index 92e1b087392d..1b6398d2f929 100644
--- a/nixos/modules/system/boot/systemd/user.nix
+++ b/nixos/modules/system/boot/systemd/user.nix
@@ -42,7 +42,7 @@ let
 
   writeTmpfiles = { rules, user ? null }:
     let
-      suffix = if user == null then "" else "-${user}";
+      suffix = optionalString (user != null) "-${user}";
     in
     pkgs.writeTextFile {
       name = "nixos-user-tmpfiles.d${suffix}";