From e0a601e1f7c7e2bb7d31ae3e3226dacd599b3b41 Mon Sep 17 00:00:00 2001 From: Eman Resu Date: Sun, 19 Jul 2026 22:28:11 -0400 Subject: [PATCH] nixos/tmpfiles: partially apply hasPrefix and removePrefix calls --- nixos/modules/system/boot/systemd/tmpfiles.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nixos/modules/system/boot/systemd/tmpfiles.nix b/nixos/modules/system/boot/systemd/tmpfiles.nix index 631a02645d9b..b43d91d58dd0 100644 --- a/nixos/modules/system/boot/systemd/tmpfiles.nix +++ b/nixos/modules/system/boot/systemd/tmpfiles.nix @@ -25,6 +25,8 @@ let " " "\\" ]; + hasTmpfilesPrefix = lib.hasPrefix "tmpfiles.d/"; + removeTmpFilesPrefix = lib.removePrefix "tmpfiles.d/"; settingsOption = { description = '' @@ -299,8 +301,8 @@ in '' + concatMapStrings ( name: - optionalString (hasPrefix "tmpfiles.d/" name) '' - rm -f $out/${removePrefix "tmpfiles.d/" name} + optionalString (hasTmpfilesPrefix name) '' + rm -f $out/${removeTmpFilesPrefix name} '' ) config.system.build.etc.passthru.targets; })