mirror of
https://github.com/nix-community/impermanence
synced 2024-11-10 05:44:17 +00:00
Skip generating bind mounts if no bind mounts are configured.
This fixes #105 by no longer generating an empty bash function. Empty functions in bash are invalid, which cause the activation to fail.
This commit is contained in:
parent
df1692e2d9
commit
6f4fc9d70c
1 changed files with 3 additions and 2 deletions
|
@ -399,7 +399,7 @@ in
|
|||
|
||||
in
|
||||
mkMerge [
|
||||
(mkIf (any (path: cfg.${path}.directories != [ ]) persistentStoragePaths) {
|
||||
(mkIf (any (path: (filter isSymlink cfg.${path}.directories) != [ ]) persistentStoragePaths) {
|
||||
# Clean up existing empty directories in the way of links
|
||||
cleanEmptyLinkTargets =
|
||||
dag.entryBefore
|
||||
|
@ -407,7 +407,8 @@ in
|
|||
''
|
||||
${concatMapStrings mkLinkCleanupForPath persistentStoragePaths}
|
||||
'';
|
||||
|
||||
})
|
||||
(mkIf (any (path: (filter isBindfs cfg.${path}.directories) != [ ]) persistentStoragePaths) {
|
||||
createAndMountPersistentStoragePaths =
|
||||
dag.entryBefore
|
||||
[ "writeBoundary" ]
|
||||
|
|
Loading…
Reference in a new issue