diff --git a/modules/persist/stores/private.nix b/modules/persist/stores/private.nix index 1e255030..6f54758c 100644 --- a/modules/persist/stores/private.nix +++ b/modules/persist/stores/private.nix @@ -45,7 +45,13 @@ lib.mkIf config.sane.persist.enable # let sane.fs know about the mount sane.fs."${origin}".mount = {}; # it also needs to know that the underlying device is an ordinary folder - sane.fs."${backing}".dir = {}; + sane.fs."${backing}" = sane-lib.fs.wantedDir; + # in order for non-systemd `mount` to work, the mount point has to already be created, so make that a default target + systemd.units = let + originUnit = config.sane.fs."${origin}".generated.unit; + in { + "${originUnit}".wantedBy = [ "local-fs.target" ]; + }; # TODO: could add this *specifically* to the .mount file for the encrypted fs? system.fsPackages = [ pkgs.gocryptfs ]; # fuse needs to find gocryptfs