From 4f0ffa214605c7967317d8bc7cd62a16bc3dff47 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Sat, 5 Sep 2020 12:29:21 +0200 Subject: [PATCH] Fix linking to non-existent directories --- modules/zfs.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/zfs.nix b/modules/zfs.nix index 03b08e63..baa0b0e5 100644 --- a/modules/zfs.nix +++ b/modules/zfs.nix @@ -1,7 +1,10 @@ { config, lib, ... }: let linkCommands = map - (location: "$DRY_RUN_CMD ln -sf -T $VERBOSE_ARG \"/${location.type}/home/charlotte/${location.path}\" \"/home/charlotte/${location.path}\"") + (location: '' + $DRY_RUN_CMD mkdir -p $VERBOSE_ARG "/home/charlotte/$(dirname ${location.path})" + $DRY_RUN_CMD ln -sf -T $VERBOSE_ARG "/${location.type}/home/charlotte/${location.path}" "/home/charlotte/${location.path}" + '') config.custom.zfs.homeLinks; in {