feat: sops-nix secrets management

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-06-28 06:48:37 +02:00
commit ab550cd0a7
4 changed files with 85 additions and 0 deletions

23
modules/secrets.nix Normal file
View file

@ -0,0 +1,23 @@
{ config, lib, pkgs, ... }:
# sops-nix per-host wiring.
#
# The sops-nix module itself is injected by lib/mksystem.nix. This
# file points sops at the omni default file and the host's age
# key. Secrets are exposed to services as files under
# /run/secrets/<name>, declared per-secret via `sops.secrets.<name>`
# in the module that consumes them.
#
# Recipients live in /etc/nixos/.sops.yaml; the matching age key
# lives at ~/.config/sops/age/keys.txt on omni/bohm.
let
sopsFile = ../secrets/omni.yaml;
in
{
sops = lib.mkIf (builtins.pathExists sopsFile) {
defaultSopsFile = sopsFile;
defaultSopsFormat = "yaml";
age.keyFile = "/home/padreug/.config/sops/age/keys.txt";
};
}