Skip to content
Proyek

Tentang

Rahasia yang dienkripsi dengan age untuk NixOS dan Home Manager

Keamanan dan privasi

Cara angka ini diukur

2,552 bintang161 Fork +1 dalam 24 jam

Pertumbuhan bintang terukur

dalam 24 jam
+1
dalam 7 hari
+6
dalam 15 hari
+8
dalam 1 bulan
+19

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

agenix: age-encrypted secrets for NixOS and Home Manager

Read the documentation.

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

For help, use GitHub issues.

Jelajahi proyek terkait

Memuat…