tidy up small persist/private nitpicks

This commit is contained in:
Colin 2024-02-23 14:44:38 +00:00
parent 120a41b169
commit 6267e7f966
3 changed files with 3 additions and 5 deletions

View File

@ -1,7 +1,6 @@
{ ... }:
{
sane.persist.stores.private.origin = "/mnt/persist/private";
# store /home/colin/a/b in /mnt/persist/private/a/b instead of /mnt/persist/private/home/colin/a/b
sane.persist.stores.private.prefix = "/home/colin";

View File

@ -41,9 +41,8 @@
# - <https://github.com/lourkeur/distro/blob/11173454c6bb50f7ccab28cc2c757dca21446d1d/nixos/profiles/users/louis-full.nix>
# - <https://github.com/dnr/sample-nix-code/blob/03494480c1fae550c033aa54fd96aeb3827761c5/nixos/laptop.nix>
pamMount = let
hasPrivate = config.fileSystems ? "/mnt/persist/private";
priv = config.fileSystems."/mnt/persist/private";
in lib.mkIf hasPrivate {
priv = config.fileSystems."${config.sane.persist.stores.private.origin}";
in {
fstype = priv.fsType;
path = priv.device;
mountpoint = priv.mountPoint;

View File

@ -15,7 +15,7 @@ lib.mkIf config.sane.persist.enable
typical use case is for the user to encrypt this store using their login password so that it
can be auto-unlocked at login.
'';
origin = lib.mkDefault "/mnt/private";
origin = lib.mkDefault "/mnt/persist/private";
defaultOrdering = let
private-unit = config.sane.fs."${private-dir}".unit;
in {