Skip to content

Commit

Permalink
+
Browse files Browse the repository at this point in the history
  • Loading branch information
oluceps committed Sep 14, 2024
1 parent 137a66a commit 20f7b01
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
11 changes: 10 additions & 1 deletion module/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ let
) "`systemd.sysusers` or `services.userborn` must be enabled.";

settingsType = types.submodule (
{ config, ... }:
submod:
{
options = {

Expand All @@ -51,6 +51,15 @@ let
'';
};

hostIdentifier = mkOption {
type = types.str;
default = config.networking.hostName;
readOnly = true;
description = ''
Host identifier
'';
};

decryptedMountPoint = mkOption {
type =
types.addCheck types.str (
Expand Down
1 change: 1 addition & 0 deletions src/cmd/renc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ impl Profile {
let renc_path = {
let mut p = PathBuf::from_str(SEC_DIR)?;
p.push("renced");
p.push(self.settings.host_identifier.clone());
p
};
if !renc_path.exists() {
Expand Down
1 change: 1 addition & 0 deletions src/profile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pub struct Secret {
pub struct Settings {
pub decrypted_dir: String,
pub decrypted_mount_point: String,
pub host_identifier: String,
pub extraEncryption_pubkeys: Vec<String>,
pub host_pubkey: String,
pub storage_dir: String,
Expand Down

0 comments on commit 20f7b01

Please sign in to comment.