Skip to content

Commit

Permalink
+ doc workflow details
Browse files Browse the repository at this point in the history
  • Loading branch information
oluceps committed Nov 15, 2024
1 parent 01c4b23 commit 136e962
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 8 deletions.
6 changes: 4 additions & 2 deletions doc/src/faq.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Frequent Asked Questions

1. rebooting deploy failed with could not found ssh private key, but it indeed just there.
**Q.** Rebooting and unit failed with could not found ssh private key, but it indeed just there.

Check if using `root on tmpfs`, and modify [hostKeys](https://oluceps.github.io/vaultix/nixos-option.html#hostkeys) path to Absolute path string to your REAL private key location (not bind mounted or symlinked etc.)
**A.** Check if using `root on tmpfs`, and modify [hostKeys](https://oluceps.github.io/vaultix/nixos-option.html#hostkeys) path to Absolute path string to your REAL private key location (not bind mounted or symlinked etc.)

---
3 changes: 0 additions & 3 deletions doc/src/flake-option.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ Recipients used for backup. Any of identity of them will able to decrypt all sec

> Changing this will not take effect to `renc` command output. The hash of host pub key re-encrypted filename is `blake3(encrypted secret content + host public key)`.
I personally don't recommend setting this.


### cache =

**String** of path that **relative** to flake root, used for storing host public key
Expand Down
2 changes: 1 addition & 1 deletion doc/src/nixos-option.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ This pretend the secret which `id` (the keyof attribute of secrets) was defined.

```nix
secrets = {
# the id is example. despite `name`.
# the id is 'example'. despite `name`.
example = {
file = ./secret/example.age;
};
Expand Down
65 changes: 63 additions & 2 deletions doc/src/workflow.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,63 @@
# TODO
Common used workflow with vaultix
# Workflows
Common used workflow with vaultix.

## Add new secret


### 1. Run edit:

```bash
nix run .#vaultix.app.x86_64-linux.edit -- ./where/new-to-add.age
```

### 2. Add a secret to nixos module:

```nix
secrets = {
#...
new-to-add.file = ./where/new-to-add.age;
};
```

### 3. Run renc:


```bash
nix run .#vaultix.app.x86_64-linux.renc
```

### 4. Add new produced stuff to git.



## Modify existed secret


```bash
nix run .#vaultix.app.x86_64-linux.edit -- ./where/to-edit.age
```

```bash
nix run .#vaultix.app.x86_64-linux.renc
```

Then add changes to git.

## Remove secret


```diff
secrets = {
#...
- new-to-add.file = ./where/new-to-add.age;
};
```

```bash
rm ./where/new-to-add.age
```

```bash
nix run .#vaultix.app.x86_64-linux.renc
```
Then add changes to git.

0 comments on commit 136e962

Please sign in to comment.