Extend flake install section

This commit is contained in:
malteneuss 2023-07-16 21:34:50 +02:00 committed by GitHub
parent 6d20bf81f8
commit 1d7fd15690
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -199,13 +199,14 @@ To install the `agenix` binary:
#### Install CLI via Flakes #### Install CLI via Flakes
You don't need to install it, You can run the CLI tool ad-hoc without installing it:
```ShellSession ```ShellSession
nix run github:ryantm/agenix -- --help nix run github:ryantm/agenix -- --help
``` ```
but, if you want to (change the system based on your system): But you can also add it permanently into a [NixOS module](https://nixos.wiki/wiki/NixOS_modules)
(replace system "x86_64-linux" with your system):
```nix ```nix
{ {
@ -213,6 +214,28 @@ but, if you want to (change the system based on your system):
} }
``` ```
e.g. inside your `flake.nix` file:
```nix
{
inputs.agenix.url = "github:ryantm/agenix";
# ...
outputs = { self, nixpkgs, agenix }: {
# change `yourhostname` to your actual hostname
nixosConfigurations.yourhostname = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
# ...
{
environment.systemPackages = [ agenix.packages.${system}.default ];
}
];
};
};
}
```
</details> </details>
## Tutorial ## Tutorial