impermanence: fix home perms in ~/private dir

This commit is contained in:
colin 2023-01-04 13:24:23 +00:00
parent cd5f8054c0
commit 122d3cd7e4

View File

@ -1,7 +1,8 @@
{ config, lib, ... }: { config, lib, sane-lib, ... }:
let let
cfg = config.sane.impermanence; cfg = config.sane.impermanence;
path = sane-lib.path;
in in
{ {
imports = [ imports = [
@ -20,8 +21,10 @@ in
# what is a problem is if the user specified some other dir we don't know about here. # what is a problem is if the user specified some other dir we don't know about here.
# like "/var", and then "/nix/persist/var" has different perms and something mounts funny. # like "/var", and then "/nix/persist/var" has different perms and something mounts funny.
# TODO: just add assertions that sane.fs."${backing}/${dest}".dir == sane.fs."${dest}" for each mount point? # TODO: just add assertions that sane.fs."${backing}/${dest}".dir == sane.fs."${dest}" for each mount point?
sane.fs = lib.mapAttrs' (_name: store: { sane.fs = lib.mapAttrs' (_name: store: let
name = "${store.origin}/home/colin"; home-in-store = path.from store.prefix "/home/colin";
in {
name = path.concat [ store.origin home-in-store ];
value.dir.acl = config.sane.fs."/home/colin".generated.acl; value.dir.acl = config.sane.fs."/home/colin".generated.acl;
}) cfg.stores; }) cfg.stores;
}; };