From 0d0788cd4ee378fba19e47a2c5d5527c196b65e0 Mon Sep 17 00:00:00 2001 From: Karan Jayachandra Date: Fri, 17 Jul 2026 14:34:18 +0200 Subject: Initial commit --- modules/sops.nix | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 modules/sops.nix (limited to 'modules/sops.nix') diff --git a/modules/sops.nix b/modules/sops.nix new file mode 100644 index 0000000..774caad --- /dev/null +++ b/modules/sops.nix @@ -0,0 +1,36 @@ +{ config, ... }: + +# sops-nix configuration. +# Secrets are encrypted to two recipients: +# 1. Your personal age key (derived from your SSH ed25519 key via ssh-to-age) +# 2. This host's age key (derived from /etc/ssh/ssh_host_ed25519_key at boot) +# +# The host key path below is where sops-nix looks by default when +# services.openssh generates the host key. +{ + sops = { + defaultSopsFile = ../../secrets/secrets.yaml; + defaultSopsFormat = "yaml"; + + # Derive the machine's age key from its SSH ed25519 host key. + # This key is auto-generated by OpenSSH on first boot and stays stable. + age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; + + secrets = { + # Miniflux admin credentials file (ADMIN_USERNAME=... ADMIN_PASSWORD=...) + "miniflux/admin" = { + owner = "miniflux"; + group = "miniflux"; + mode = "0400"; + }; + + # AdGuard Home admin password bcrypt hash + # Format: plain string containing only the bcrypt hash + "adguard/password_hash" = { + owner = "adguardhome"; + group = "adguardhome"; + mode = "0400"; + }; + }; + }; +} -- cgit v1.3.1