From 6e5bde17aaab6bb4132ae369e842d73e7d6358bf Mon Sep 17 00:00:00 2001 From: Colin Date: Fri, 2 Aug 2024 05:00:20 +0000 Subject: [PATCH] cleanup: persist/private: simplify --- modules/persist/stores/private.nix | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/modules/persist/stores/private.nix b/modules/persist/stores/private.nix index 71c2c51f2..8093743c6 100644 --- a/modules/persist/stores/private.nix +++ b/modules/persist/stores/private.nix @@ -111,10 +111,13 @@ lib.mkIf config.sane.persist.enable }; # let sane.fs know about the mount - sane.fs."${origin}".mount.depends = [ - config.sane.fs."${backing}".unit - config.sane.fs."/run/gocryptfs".unit - ]; + sane.fs."${origin}" = { + mount.depends = [ + config.sane.fs."${backing}".unit + config.sane.fs."/run/gocryptfs".unit + ]; + wantedBy = [ "local-fs.target" ]; + }; # it also needs to know that the underlying device is an ordinary folder sane.fs."${backing}".dir.acl.user = config.sane.defaultUser; sane.fs."/run/gocryptfs".dir.acl = { @@ -122,13 +125,6 @@ lib.mkIf config.sane.persist.enable mode = "0700"; }; - # 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" ]; - }; - system.fsPackages = [ gocryptfs-private ]; sane.user.services.gocryptfs-private = {