From 224510cec2a4095e3e7f23d2af20f15b68a6f8f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 16 Sep 2024 18:45:00 +0200 Subject: [PATCH] nixos/syncoid: don't prepend escapeUnitName --- nixos/modules/services/backup/syncoid.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/modules/services/backup/syncoid.nix b/nixos/modules/services/backup/syncoid.nix index 97d39544d5bb..4a59336fbdec 100644 --- a/nixos/modules/services/backup/syncoid.nix +++ b/nixos/modules/services/backup/syncoid.nix @@ -312,7 +312,7 @@ in systemd.services = lib.mapAttrs' (name: c: - lib.nameValuePair "syncoid-${lib.escapeUnitName name}" (lib.mkMerge [ + lib.nameValuePair "syncoid-${escapeUnitName name}" (lib.mkMerge [ { description = "Syncoid ZFS synchronization from ${c.source} to ${c.target}"; after = [ "zfs.target" ]; @@ -376,15 +376,15 @@ in RestrictNamespaces = true; RestrictRealtime = true; RestrictSUIDSGID = true; - RootDirectory = "/run/syncoid/${lib.escapeUnitName name}"; + RootDirectory = "/run/syncoid/${escapeUnitName name}"; RootDirectoryStartOnly = true; BindPaths = [ "/dev/zfs" ]; BindReadOnlyPaths = [ builtins.storeDir "/etc" "/run" "/bin/sh" ]; # Avoid useless mounting of RootDirectory= in the own RootDirectory= of ExecStart='s mount namespace. - InaccessiblePaths = [ "-+/run/syncoid/${lib.escapeUnitName name}" ]; + InaccessiblePaths = [ "-+/run/syncoid/${escapeUnitName name}" ]; MountAPIVFS = true; # Create RootDirectory= in the host's mount namespace. - RuntimeDirectory = [ "syncoid/${lib.escapeUnitName name}" ]; + RuntimeDirectory = [ "syncoid/${escapeUnitName name}" ]; RuntimeDirectoryMode = "700"; SystemCallFilter = [ "@system-service"