mirror of
https://github.com/Mic92/sops-nix.git
synced 2026-07-17 06:25:16 +08:00
docs: install and configure with nix-darwin
This commit is contained in:
parent
61154300d9
commit
4a195bdac0
1 changed files with 25 additions and 0 deletions
25
README.md
25
README.md
|
|
@ -78,6 +78,29 @@ If you use experimental nix flakes support:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### [`nix-darwin`](https://github.com/nix-darwin/nix-darwin)
|
||||||
|
|
||||||
|
A module for `nix-darwin` is also available for global install with flakes:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{
|
||||||
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
inputs.nix-darwin.url = "github:nix-darwin/nix-darwin/master";
|
||||||
|
inputs.nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.sops-nix.url = "github:Mic92/sops-nix";
|
||||||
|
#inputs.sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
outputs = { self, nix-darwin, nixpkgs, sops-nix }: {
|
||||||
|
darwinConfigurations.yourhostname = nix-darwin.lib.darwinSystem {
|
||||||
|
modules = [
|
||||||
|
./configuration.nix
|
||||||
|
sops-nix.darwinModules.sops
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
#### [`niv`](https://github.com/nmattia/niv) (recommended if not using flakes)
|
#### [`niv`](https://github.com/nmattia/niv) (recommended if not using flakes)
|
||||||
First add it to niv:
|
First add it to niv:
|
||||||
|
|
||||||
|
|
@ -155,6 +178,8 @@ $ nix-shell -p gnupg -p ssh-to-pgp --run "ssh-to-pgp -private-key -i /tmp/id_rsa
|
||||||
$ rm /tmp/id_rsa
|
$ rm /tmp/id_rsa
|
||||||
```
|
```
|
||||||
|
|
||||||
|
When using `nix-darwin` save the `age` key to `$HOME/Library/Application Support/sops/age/keys.txt` or set a [custom](https://github.com/getsops/sops#23encrypting-using-age) configuration directory.
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary> How to find the public key of an `age` key </summary>
|
<summary> How to find the public key of an `age` key </summary>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue