modules/persist: ensure that the mountpoint for the private store is created at boot

This commit is contained in:
Colin 2024-02-25 07:51:24 +00:00
parent 52b8cd0209
commit 6ab5dd8a8f
1 changed files with 7 additions and 1 deletions

View File

@ -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