Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #458

Merged
merged 3 commits into from
Jan 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update README.md
Add  home-manager usage example that is inline with current recommended sops-nix installation approach. The required import path is substantially different than that of the other example, which has been retained.
EmergentMind authored Dec 23, 2023
commit 058515ac61b4e5e7ea9d48e8ee8ad0ceadb06a20
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -727,7 +727,27 @@ Instead of running as an activation script, sops-nix runs as a systemd user serv
And instead of decrypting to `/run/secrets`, the secrets are decrypted to `$XDG_RUNTIME_DIR/secrets` that is located on a tmpfs or similar non-persistent filesystem.

Depending on whether you use home-manager system-wide or using a home.nix, you have to import it in a different way.
This example show the `channel` approach from the example [Install: nix-channel](#nix-channel) for simplicity, but all other methods work as well.
This exmaple shows the `flake` approach from the recommended example [Install: Flakes (current recommendation)](#Flakes (current recommendation))

```nix
{
# NixOS system-wide home-manager configuration
home-manager.sharedModules = [
inputs.sops-nix.homeManagerModules.sops
];
}
```

```nix
{
# Configuration via home.nix
imports = [
inputs.sops-nix.homeManagerModules.sops
];
}
```

This example show the `channel` approach from the example [Install: nix-channel](#nix-channel). All other methods work as well.

```nix
{