aboutsummaryrefslogtreecommitdiff
path: root/modules/sops.nix
diff options
context:
space:
mode:
authorKaran Jayachandra <karan.jayachandra@nxp.com>2026-07-17 14:34:18 +0200
committerKaran Jayachandra <karan.jayachandra@nxp.com>2026-07-17 14:34:18 +0200
commit0d0788cd4ee378fba19e47a2c5d5527c196b65e0 (patch)
tree0fbd0e2644e94e0227005947004541fd4ff4d53e /modules/sops.nix
Initial commit
Diffstat (limited to 'modules/sops.nix')
-rw-r--r--modules/sops.nix36
1 files changed, 36 insertions, 0 deletions
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";
+ };
+ };
+ };
+}