sops-nix is a declarative secret provisioner and management module for NixOS and Home Manager. It enables the storage of encrypted secrets directly in version control and decrypts them into a non-persistent ramfs during system activation to provide plaintext files to services without storing them on disk.
The project distinguishes itself through a tight integration with the NixOS activation hook and systemd, allowing it to delay service startup until decryption completes and automatically restart units when secret values are updated. It also provides utilities to transform existing SSH host keys into age or GPG compatible keys to authorize machine-based decryption.
The framework covers broad capability areas including multi-format secret parsing for YAML, JSON, and binary files, declarative permission control for user and group ownership, and build-time validation to catch configuration errors before deployment. It also supports atomic secret directory replacement to ensure consistent system rollbacks.
The module integrates with the sops CLI for encryption and decryption across GPG, age, and SSH backends.