From cd5f8054c0923d8c9b51cc87f2102d7f0311ba23 Mon Sep 17 00:00:00 2001 From: colin Date: Wed, 4 Jan 2023 12:19:32 +0000 Subject: [PATCH] fs: rename "mountpt" -> "origin" to reflect that it doesnt have to be a device --- hosts/servo/fs.nix | 2 +- modules/impermanence/default.nix | 4 ++-- modules/impermanence/stores/crypt.nix | 2 +- modules/impermanence/stores/default.nix | 2 +- modules/impermanence/stores/plaintext.nix | 2 +- modules/impermanence/stores/private.nix | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hosts/servo/fs.nix b/hosts/servo/fs.nix index 4d7cfa529..f6db2f273 100644 --- a/hosts/servo/fs.nix +++ b/hosts/servo/fs.nix @@ -37,7 +37,7 @@ }; sane.impermanence.stores."ext" = { - mountpt = "/mnt/impermanence/ext/persist"; + origin = "/mnt/impermanence/ext/persist"; storeDescription = "external HDD storage"; }; sane.fs."/mnt/impermanence/ext".mount = {}; diff --git a/modules/impermanence/default.nix b/modules/impermanence/default.nix index 85154fe54..8d8950326 100644 --- a/modules/impermanence/default.nix +++ b/modules/impermanence/default.nix @@ -21,7 +21,7 @@ let 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; }; prefix = mkOption { @@ -163,7 +163,7 @@ in let store = opt.store; 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 dir-acl = sane-lib.filterNonNull { diff --git a/modules/impermanence/stores/crypt.nix b/modules/impermanence/stores/crypt.nix index 297c7afb2..4a7f2362b 100644 --- a/modules/impermanence/stores/crypt.nix +++ b/modules/impermanence/stores/crypt.nix @@ -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 so that it's unreadable after power-off ''; - mountpt = store.device; + origin = store.device; }; diff --git a/modules/impermanence/stores/default.nix b/modules/impermanence/stores/default.nix index 11b8266b8..8dd5cbc5f 100644 --- a/modules/impermanence/stores/default.nix +++ b/modules/impermanence/stores/default.nix @@ -21,7 +21,7 @@ in # 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? 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; }) cfg.stores; }; diff --git a/modules/impermanence/stores/plaintext.nix b/modules/impermanence/stores/plaintext.nix index 5a74f6e69..4d1aaee6a 100644 --- a/modules/impermanence/stores/plaintext.nix +++ b/modules/impermanence/stores/plaintext.nix @@ -4,7 +4,7 @@ let cfg = config.sane.impermanence; in lib.mkIf cfg.enable { sane.impermanence.stores."plaintext" = { - mountpt = "/nix/persist"; + origin = "/nix/persist"; }; # TODO: needed? # sane.fs."/nix".mount = {}; diff --git a/modules/impermanence/stores/private.nix b/modules/impermanence/stores/private.nix index cb9d37aa2..4da54a8ff 100644 --- a/modules/impermanence/stores/private.nix +++ b/modules/impermanence/stores/private.nix @@ -6,7 +6,7 @@ lib.mkIf config.sane.impermanence.enable storeDescription = '' 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. # internally, this prefix is removed so that e.g. # /home/colin/foo/bar when stored in `private` is visible at