From 2e922745484aa06b4d63e834bdf157943af065b7 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 7 Dec 2024 21:09:18 +0100 Subject: [PATCH] Remove trailing slashes properly --- lib/modules/fileSystems.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/modules/fileSystems.nix b/lib/modules/fileSystems.nix index ab2e0c84..1b54ed7c 100644 --- a/lib/modules/fileSystems.nix +++ b/lib/modules/fileSystems.nix @@ -67,6 +67,7 @@ in fileSystems = { script = let + inherit (lib.strings) normalizePath removeSuffix; devices = (builtins.attrValues cfg.diskSetup.devices); mountScript = lib.strings.concatLines ( (builtins.concatMap @@ -80,7 +81,7 @@ in [ (builtins.concatStringsSep " " (builtins.map (_: "-o ${_}") _.options)) (_.device) - (lib.strings.normalizePath "/${cfg.diskSetup.rootDir}/${_.mountPoint}") + (removeSuffix "/" (normalizePath "/${cfg.rootDir}/${_.mountPoint}")) ] )) ]