ssh: private host aliases via sops-provisioned include

This commit is contained in:
Sergei Poljanski 2026-07-14 12:24:34 +04:00
commit c6258a77e4
Signed by: asxpi
GPG key ID: 4F8851660FA4121B
2 changed files with 9 additions and 7 deletions

View file

@ -1,6 +0,0 @@
{ ... }:
{
# Stub. Real values kept locally via:
# git update-index --skip-worktree modules/private/ssh-hosts.nix
programs.ssh.extraConfig = "";
}

View file

@ -2,7 +2,15 @@
{ config, pkgs, lib, ... }:
{
imports = [ ./private/ssh-hosts.nix ];
# Private SSH host aliases live in sops (secrets/network.yaml: ssh-hosts)
sops.secrets."ssh-hosts" = {
sopsFile = "/etc/nixos/secrets/network.yaml";
key = "ssh-hosts";
mode = "0444";
};
programs.ssh.extraConfig = ''
Include /run/secrets/ssh-hosts
'';
# GPG agent
programs.gnupg.agent = {