home/fs: limit ~/.persist/* to just the users home data

This commit is contained in:
2024-10-18 05:00:35 +00:00
parent 4a0ae85dd5
commit 2dec4a648e

View File

@@ -32,9 +32,15 @@
sane.user.fs = let
persistEnabled = config.sane.persist.enable;
in {
".persist/private" = lib.mkIf persistEnabled { symlink.target = config.sane.persist.stores.private.origin; };
".persist/plaintext" = lib.mkIf persistEnabled { symlink.target = config.sane.persist.stores.plaintext.origin; };
".persist/ephemeral" = lib.mkIf persistEnabled { symlink.target = config.sane.persist.stores.ephemeral.origin; };
".persist/private" = lib.mkIf persistEnabled {
symlink.target = "${config.sane.persist.stores.private.origin}/home/${config.sane.defaultUser}";
};
".persist/plaintext" = lib.mkIf persistEnabled {
symlink.target = "${config.sane.persist.stores.plaintext.origin}/home/${config.sane.defaultUser}";
};
".persist/ephemeral" = lib.mkIf persistEnabled {
symlink.target = "${config.sane.persist.stores.ephemeral.origin}/home/${config.sane.defaultUser}";
};
"nixos".symlink.target = "dev/nixos";