fs: rename "mountpt" -> "origin" to reflect that it doesnt have to be a device

This commit is contained in:
2023-01-04 12:19:32 +00:00
parent 3db388b105
commit cd5f8054c0
6 changed files with 7 additions and 7 deletions

View File

@@ -37,7 +37,7 @@
}; };
sane.impermanence.stores."ext" = { sane.impermanence.stores."ext" = {
mountpt = "/mnt/impermanence/ext/persist"; origin = "/mnt/impermanence/ext/persist";
storeDescription = "external HDD storage"; storeDescription = "external HDD storage";
}; };
sane.fs."/mnt/impermanence/ext".mount = {}; sane.fs."/mnt/impermanence/ext".mount = {};

View File

@@ -21,7 +21,7 @@ let
for example, a store named "private" could have description "ecnrypted to the user's password and decrypted on login". for example, a store named "private" could have description "ecnrypted to the user's password and decrypted on login".
''; '';
}; };
mountpt = mkOption { origin = mkOption {
type = types.str; type = types.str;
}; };
prefix = mkOption { prefix = mkOption {
@@ -163,7 +163,7 @@ in
let let
store = opt.store; store = opt.store;
store-rel-path = path.from store.prefix opt.directory; store-rel-path = path.from store.prefix opt.directory;
backing-path = path.concat [ store.mountpt store-rel-path ]; backing-path = path.concat [ store.origin store-rel-path ];
# pass through the perm/mode overrides # pass through the perm/mode overrides
dir-acl = sane-lib.filterNonNull { dir-acl = sane-lib.filterNonNull {

View File

@@ -17,7 +17,7 @@ lib.mkIf config.sane.impermanence.enable
stored to disk, but encrypted to an in-memory key and cleared on every boot stored to disk, but encrypted to an in-memory key and cleared on every boot
so that it's unreadable after power-off so that it's unreadable after power-off
''; '';
mountpt = store.device; origin = store.device;
}; };

View File

@@ -21,7 +21,7 @@ in
# 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: {
name = "${store.mountpt}/home/colin"; name = "${store.origin}/home/colin";
value.dir.acl = config.sane.fs."/home/colin".generated.acl; value.dir.acl = config.sane.fs."/home/colin".generated.acl;
}) cfg.stores; }) cfg.stores;
}; };

View File

@@ -4,7 +4,7 @@ let
cfg = config.sane.impermanence; cfg = config.sane.impermanence;
in lib.mkIf cfg.enable { in lib.mkIf cfg.enable {
sane.impermanence.stores."plaintext" = { sane.impermanence.stores."plaintext" = {
mountpt = "/nix/persist"; origin = "/nix/persist";
}; };
# TODO: needed? # TODO: needed?
# sane.fs."/nix".mount = {}; # sane.fs."/nix".mount = {};

View File

@@ -6,7 +6,7 @@ lib.mkIf config.sane.impermanence.enable
storeDescription = '' storeDescription = ''
encrypted to the user's password and auto-unlocked at login encrypted to the user's password and auto-unlocked at login
''; '';
mountpt = "/home/colin/private"; origin = "/home/colin/private";
# files stored under here *must* have the /home/colin prefix. # files stored under here *must* have the /home/colin prefix.
# internally, this prefix is removed so that e.g. # internally, this prefix is removed so that e.g.
# /home/colin/foo/bar when stored in `private` is visible at # /home/colin/foo/bar when stored in `private` is visible at