ryantm/agenix
ryantm/agenix has 2,536 GitHub stars and 159 forks. GitHot measured +1 stars in 24 hours. Last checked 2026-11-08 19:57 UTC. Last push 2026-10-20.
age-encrypted secrets for NixOS and Home manager
Measured star growth
- in 24h
- +1
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalagenix: age-encrypted secrets for NixOS and Home Manager
agenix encrypts secrets with SSH public keys so the encrypted files can be
stored and deployed with Nix. Its CLI creates and rekeys .age files; the
NixOS and Home Manager modules decrypt them at activation time for the
intended machine or user.
Quick start
Add the NixOS module to your flake:
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
inputs.agenix.url = "github:ryantm/agenix";
outputs = { nixpkgs, agenix, ... }: {
nixosConfigurations.my-host = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [ agenix.nixosModules.default ./configuration.nix ];
};
};
}
In a secrets directory, create agenix-rules.nix listing the public SSH keys
allowed to decrypt each file. Then run
nix run github:ryantm/agenix -- -e example.age to create an encrypted
secret. Declare it in a NixOS module:
{
age.secrets.example.file = ./secrets/example.age;
# Use config.age.secrets.example.path wherever a service expects a secret file.
}
The tutorial shows a complete rules file, key discovery, installation, and deployment.
Documentation
- Installation by flakes, niv, nix-channel, or fetchTarball, including Home Manager installation.
- NixOS module reference, Home Manager module reference, and CLI reference.
- Threat model and warnings and contributing and tests.
For help, use GitHub issues.
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
561,195 starspublic-apis/public-apis
A collective list of free APIs
497,410 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
445,188 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,229 stars