mirror of
https://github.com/nix-community/home-manager.git
synced 2026-12-06 04:40:17 +00:00
When programs.ssh is enabled with a custom package, use that package's ssh-keygen as the default SSH signing program. Keep the pkgs.openssh fallback otherwise so existing configurations are unchanged.
27 lines
606 B
Nix
27 lines
606 B
Nix
{ config, ... }:
|
|
|
|
{
|
|
programs.ssh = {
|
|
enable = true;
|
|
enableDefaultConfig = false;
|
|
package = config.lib.test.mkStubPackage {
|
|
name = "openssh-gssapi";
|
|
outPath = "@openssh-gssapi@";
|
|
};
|
|
};
|
|
|
|
programs.git = {
|
|
enable = true;
|
|
signing = {
|
|
format = "ssh";
|
|
key = "ssh-ed25519 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
|
|
signByDefault = true;
|
|
};
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.config/git/config
|
|
assertFileContent home-files/.config/git/config ${./git-with-ssh-package-signer-expected.conf}
|
|
'';
|
|
}
|