summaryrefslogtreecommitdiff
path: root/hosts/ahmed/ssh.nix
blob: 9e34d99f22b0c600229b10a4707a1c6c5e19f031 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# This file configures openSSH on this host.

{ config, pkgs, lib, misc, ... }:

{
  # Who is allowed/expected to connect to this machine?
  networking.firewall.allowedTCPPorts = [ 22 ];
  services.openssh = {
    enable = true;
    passwordAuthentication = false; 
  };

  users.users = lib.genAttrs ["root" "linus"] (_: {
    openssh.authorizedKeys.keys = 
      [
        misc.metadata.hosts.muhammed.sshPubKey
      ];
  });
}