fix(sops): use NixOS system module on WSL to avoid systemd user service failure

This commit is contained in:
2026-04-13 13:49:27 +08:00
parent 2a1fb40fd3
commit 2f6e3aea89
4 changed files with 73 additions and 22 deletions
+1
View File
@@ -5,6 +5,7 @@
./base.nix
./docker.nix
./locale.nix
./secrets.nix
];
# ── Default shell ──────────────────────────────────
+28
View File
@@ -0,0 +1,28 @@
{ username, ... }:
{
# ── sops (system-level) ─────────────────────────────
# Use NixOS module instead of home-manager module to avoid
# systemd user service issues on WSL.
# Secrets are placed in /run/secrets/<name>.
sops = {
age.sshKeyPaths = [ "/home/${username}/.ssh/id_ed25519" ];
defaultSopsFile = ../../secrets/secrets.yaml;
defaultSopsFormat = "yaml";
secrets = {
ai_gateway_base_url = {
owner = username;
};
ai_gateway_api_key = {
owner = username;
};
exa_api_key = {
owner = username;
};
context7_api_key = {
owner = username;
};
};
};
}