Skip to content

Commit

Permalink
+ enhance docs
Browse files Browse the repository at this point in the history
  • Loading branch information
oluceps committed Nov 5, 2024
1 parent 415c245 commit 5121c97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,11 @@ Adding nixosModule config:
}
```

> [!TIP]
> During first setup, you need to manually create `storageLocation` and
> add it to git (create an placeholder since git ignores empty directory).
Then run renc before deploy.

This step also needed every time the host key or secret content changed.

```bash
mkdir -p ./secret/renc/HOSTNAME_HERE
touch ./secret/renc/HOSTNAME_HERE/.placeholder
# So that you could add the directory to git (for recognizing by flake).
git add .
# Freely could remove placeholder once complete this step.
nix run .#vaultix.x86_64-linux.renc
```

Expand Down
8 changes: 5 additions & 3 deletions module/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ let
# TODO: canonicalize this path, beauty
storagePath = "/" + self + "/" + cfg.settings.storageLocation;
storageExist = builtins.pathExists storagePath;
storageNotFoundWarn = warnIf (
!storageExist
) "path not exist: ${storagePath}\nThis build will fail please run renc app and add ${cfg.settings.storageLocation} to git first." true;
storageNotFoundWarn =
warnIf (!storageExist)
# NOTICE: here has ASCII control char `\e` which may not shown in editor
"path not exist: ${storagePath}\nThis build will fail please run renc app and add ${cfg.settings.storageLocation} to git first."
true;

settingsType = types.submodule (submod: {
options = {
Expand Down

0 comments on commit 5121c97

Please sign in to comment.