refactor ssh

This commit is contained in:
Daniel Langbein 2023-08-31 14:07:09 +02:00
parent 67f39294de
commit bf1585fdad
2 changed files with 24 additions and 15 deletions

View File

@ -7,6 +7,7 @@ in
imports = [
(import "${home-manager}/nixos")
./git.home.nix
./nitrokey-ssh-gpg.home.nix
];
/* Enable home-manager to configure GNOME */
@ -28,21 +29,6 @@ in
# defaultCacheTtl = 1800;
#};
programs.ssh = {
enable = true;
userKnownHostsFile = "~/.ssh/known_hosts ${../known_hosts}";
matchBlocks = {
"nas" = {
hostname = "p1st.de";
user = "yoda";
port = 2222;
compression = true;
# TODO
#preferredAuthentication = "publickey";
};
};
};
# TODO: See history.path below.
# xdg = {
# enable = true;

View File

@ -0,0 +1,23 @@
{ config, pkgs, ... }:
{
home-manager.users.yoda = {
programs.ssh = {
enable = true;
userKnownHostsFile = "~/.ssh/known_hosts ${../ssh/known_hosts}";
matchBlocks = {
"nas" = {
hostname = "p1st.de";
user = "yoda";
port = 2222;
compression = true;
#identityFile = "pubkey_nitrokey_ssh.pub";
#identitiesOnly = true;
};
};
};
};
}