persist: plaintext: consider "/mnt/persist/plaintext" as the logical root, and abstract away "/nix/persist"
This commit is contained in:
parent
0864790bb7
commit
80ecdcc4f9
|
@ -1,7 +1,7 @@
|
|||
{ config, lib, pkgs, sane-lib, utils, ... }:
|
||||
|
||||
let
|
||||
persist-base = config.sane.persist.stores."plaintext".origin;
|
||||
persist-base = "/nix/persist";
|
||||
device = config.sane.persist.stores."cryptClearOnBoot".origin;
|
||||
key = "${device}.key";
|
||||
underlying = sane-lib.path.concat [ persist-base "crypt/clearedonboot" ];
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.sane.persist;
|
||||
in lib.mkIf cfg.enable {
|
||||
sane.persist.stores."plaintext" = lib.mkDefault {
|
||||
origin = "/nix/persist";
|
||||
# TODO: parameterize!
|
||||
persist-base = "/nix/persist";
|
||||
plaintext-dir = config.sane.persist.stores."plaintext".origin;
|
||||
plaintext-backing-dir = persist-base; #< TODO: scope this!
|
||||
in lib.mkIf config.sane.persist.enable {
|
||||
sane.persist.stores."plaintext" = {
|
||||
origin = lib.mkDefault "/mnt/persist/plaintext";
|
||||
};
|
||||
# TODO: needed?
|
||||
# sane.fs."/nix".mount = {};
|
||||
|
||||
# TODO: scope this!
|
||||
sane.fs."${plaintext-dir}".mount.bind = plaintext-backing-dir;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{ config, lib, pkgs, sane-lib, utils, ... }:
|
||||
|
||||
let
|
||||
persist-base = config.sane.persist.stores."plaintext".origin;
|
||||
# TODO: parameterize!
|
||||
persist-base = "/nix/persist";
|
||||
private-dir = config.sane.persist.stores."private".origin;
|
||||
private-backing-dir = sane-lib.path.concat [ persist-base private-dir ];
|
||||
in
|
||||
|
|
Loading…
Reference in New Issue
Block a user