secrets

Manage encrypted secrets with sops-nix and age for NixOS configurations.

18|1|Updated Jun 2, 2023
One-click install
npx skills add https://github.com/DaRacci/nix-config --skill secrets-daracci
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secrets
Source: https://github.com/DaRacci/nix-config/tree/main/.opencode/skills/secrets
Command: npx skills add https://github.com/DaRacci/nix-config --skill secrets-daracci

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a robust and secure method for managing sensitive information like API keys, passwords, and configuration details, ensuring they are encrypted at rest and only accessible when needed.

Core Features & Use Cases

  • Encrypted Secret Storage: Utilizes sops-nix with age encryption to protect secrets.
  • Hierarchical Scoping: Allows secrets to be defined globally, per host type, per host, or per user.
  • Automated Declaration and Usage: Simplifies the process of declaring secrets in Nix configurations and using them in services or applications.
  • Use Case: Securely store your cloud provider API keys and database credentials, making them available to your NixOS services without exposing them in plain text within your configuration files.

Quick Start

Use the secrets skill to add a new API key for the 'MY_SERVICE' to the host-specific secrets file.

Frequently Asked Questions about secrets

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage encrypted secrets in NixOS configurations?

Manage encrypted secrets in NixOS using sops-nix with age encryption to securely store and retrieve sensitive data. This approach ensures secrets are encrypted at rest and only accessible when needed within your Nix configurations.

Can I scope secret access per host or user with sops-nix and age?

Yes, you can scope secret access hierarchically with sops-nix and age. Secrets can be defined globally, per host type, per individual host, or per user, enabling granular control over credential deployment.

How do I store API keys securely for NixOS services?

Store API keys securely for NixOS services by declaring them as encrypted secrets using sops-nix. This keeps your credentials encrypted at rest and makes them available to services without exposing plain text in configuration files.

Does sops-nix work with home-manager configurations?

Yes, sops-nix works with home-manager configurations to manage encrypted secrets. It applies to both NixOS and home-manager setups, enabling secure credential management and automated secret deployment for user-specific applications.

What is the best way to deploy secrets automatically in NixOS?

The best way to deploy secrets automatically in NixOS is using sops-nix with age encryption. It simplifies declaring secrets in Nix configurations and automates their secure deployment to hosts and users.

Why use age encryption over other methods for NixOS secrets?

Use age encryption for NixOS secrets because it provides secure storage and retrieval when integrated with sops-nix. This combination enables template-based secret integration and ensures sensitive information is encrypted at rest.