From bf1585fdad511fb329f18124c76e2667bc956fb7 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Thu, 31 Aug 2023 14:07:09 +0200 Subject: [PATCH] refactor ssh --- yodaTab/home-manager.nix | 16 +--------------- yodaTab/nitrokey-ssh-gpg.home.nix | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 15 deletions(-) create mode 100644 yodaTab/nitrokey-ssh-gpg.home.nix diff --git a/yodaTab/home-manager.nix b/yodaTab/home-manager.nix index 78083c9..b6d5cf0 100644 --- a/yodaTab/home-manager.nix +++ b/yodaTab/home-manager.nix @@ -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; diff --git a/yodaTab/nitrokey-ssh-gpg.home.nix b/yodaTab/nitrokey-ssh-gpg.home.nix new file mode 100644 index 0000000..de8ce71 --- /dev/null +++ b/yodaTab/nitrokey-ssh-gpg.home.nix @@ -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; + }; + }; + }; + + }; +}