nix-sops-secrets

Installation
SKILL.md

sops-nix + age secrets

Model: secrets live encrypted in git (secrets/*.sops.yaml), .sops.yaml says who can decrypt, one NixOS module declares which keys become files, and consumers read /run/secrets/<key> at runtime — never at eval time. Requires inputs.sops-nix (with inputs.nixpkgs.follows = "nixpkgs") and its module in every host (via the flake's shared modules).

Defaults verified against sops-nix's module source: secrets materialize at /run/secrets/<name>, mode 0400, owned by root unless owner is set; the host decrypts with the age key derived from its ed25519 SSH host key (config.services.openssh.hostKeys) unless sops.age.keyFile is set.

.sops.yaml — recipients as anchors, one rule

keys:
  - &framework age18lmn8r9...      # host key: ssh-to-age < /etc/ssh/ssh_host_ed25519_key.pub
  - &yk-5 age1yubikey1qt3vym...    # operator YubiKey: age-plugin-yubikey --list
creation_rules:
  - path_regex: secrets/[^/]+\.sops\.ya?ml$
    key_groups:
      - age:
          - *framework
          - *yk-5
Installs
4
First Seen
Aug 28, 2026