Remove trailing slashes properly

This commit is contained in:
Manuel Thalmann 2024-12-07 21:09:18 +01:00
parent 605c32e467
commit a4fe8d78dc

View file

@ -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}"))
]
))
]