Compare commits

...

4 commits

Author SHA1 Message Date
1e8d26bc6e
set useAcmehost to null 2026-05-09 22:21:53 +03:00
a4c735ec17
add direnv to use flake 2026-05-09 22:21:39 +03:00
07042daa14
Merge branch 'fix-sops-age-keyfile' 2026-05-09 22:17:19 +03:00
f0259cfb96 point sops at age key file
sops-nix's default identity discovery imports the host's SSH
ed25519 key as an age identity, but secrets/tide.yaml is encrypted
to the age key generated with age-keygen and stored at
/var/lib/sops-nix/key.txt. Without sops.age.keyFile pointing at
that path, activation fails with 'Error getting data key: 0
successful groups required, got 0'. Also blank the SSH/GPG
fallback paths so the module never silently picks up an
unintended identity.
2026-05-09 22:17:15 +03:00
3 changed files with 12 additions and 2 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
*~
result
/.direnv/

View file

@ -11,7 +11,7 @@
# Reuse the wildcard cert already issued for *.${domainName}
# in configuration.nix instead of requesting a new one per
# subdomain.
nginx.useACMEHost = domainName;
nginx.useACMEHost = null;
};
# Don't fail evaluation when secrets/tide.yaml is missing (e.g.
@ -20,6 +20,14 @@
# the file is absent, which is the right place for that failure.
sops.validateSopsFiles = false;
# Use the host's age key generated with age-keygen, not the
# SSH-host-key-derived identity sops-nix falls back to by default.
# The encrypted file's recipient is the public key paired with
# this private key.
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
sops.age.sshKeyPaths = [ ];
sops.gnupg.sshKeyPaths = [ ];
sops.secrets."tide-env" = {
sopsFile = ./secrets/tide.yaml;
# phpfpm reads this via EnvironmentFile, which runs as root