Add declarative ssh known hosts
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../lib
|
||||
|
||||
inputs.disko.nixosModules.disko
|
||||
./format.nix
|
||||
|
||||
|
@@ -2,7 +2,15 @@
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
selfPkgs = inputs.self.packages.${system};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user} = {
|
||||
sops.secrets = {
|
||||
@@ -17,12 +25,16 @@
|
||||
};
|
||||
};
|
||||
|
||||
programs.ssh.matchBlocks = {
|
||||
"github.com" = {
|
||||
hostname = "github.com";
|
||||
user = "git";
|
||||
identityFile = "${home}/.ssh/ssh_personal_ed25519_key";
|
||||
programs.ssh = {
|
||||
matchBlocks = {
|
||||
"github.com" = {
|
||||
hostname = "github.com";
|
||||
user = "git";
|
||||
identityFile = "${home}/.ssh/ssh_personal_ed25519_key";
|
||||
};
|
||||
};
|
||||
|
||||
userKnownHostsFiles = with selfPkgs; [ ssh-known-hosts-github ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user