Skip to content

Commit

Permalink
feat: troubleshooting agenix
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan4yin committed Nov 12, 2024
1 parent fe22e12 commit 8e1e9dd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
19 changes: 19 additions & 0 deletions secrets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,25 @@ the `age.secrets.<name>.path` argument, which defaults to `/etc/secrets`.
1. Clone this repo and run `nixos-rebuild switch` to deploy it, all the secrets will be decrypted
automatically via the host private key.

## Troubleshooting

### 1. Nix-Darwin Module

Check logs:

```bash
tail -n 100 /Library/Logs/org.nixos.activate-agenix.stderr.log
tail -n 100 /Library/Logs/org.nixos.activate-agenix.stdout.log
```

### 2. NixOS Module

Check logs:

```
journalctl | grep -5 agenix
```

## Other Replacements

- [ragenix](https://github.com/yaxitech/ragenix): A Rust reimplementation of agenix.
Expand Down
6 changes: 6 additions & 0 deletions secrets/darwin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
agenix.darwinModules.default
];

# enable logs for debugging
launchd.daemons."activate-agenix".serviceConfig = {
StandardErrorPath = "/Library/Logs/org.nixos.activate-agenix.stderr.log";
StandardOutPath = "/Library/Logs/org.nixos.activate-agenix.stdout.log";
};

environment.systemPackages = [
agenix.packages."${pkgs.system}".default
];
Expand Down

0 comments on commit 8e1e9dd

Please sign in to comment.