From 274e08f50faffe1b8e4a760811b0a12450eae719 Mon Sep 17 00:00:00 2001 From: Linnnus Date: Tue, 20 Feb 2024 19:00:53 +0100 Subject: Merge 'reorg' into 'main' This patch moves in the reorganizational work done on the reorg branch, mainly: * Move host-specific modules into hosts// * Break up HM config See the reorg branch for the individual commits. --- hosts/ahmed/ssh/default.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 hosts/ahmed/ssh/default.nix (limited to 'hosts/ahmed/ssh/default.nix') diff --git a/hosts/ahmed/ssh/default.nix b/hosts/ahmed/ssh/default.nix new file mode 100644 index 0000000..3c6b7ad --- /dev/null +++ b/hosts/ahmed/ssh/default.nix @@ -0,0 +1,19 @@ +# This file configures openSSH on this host. +{ + lib, + metadata, + ... +}: { + # Who is allowed/expected to connect to this machine? + networking.firewall.allowedTCPPorts = [22]; + services.openssh = { + enable = true; + settings.PasswordAuthentication = false; + }; + + users.users = lib.genAttrs ["root" "linus"] (_: { + openssh.authorizedKeys.keys = [ + metadata.hosts.muhammed.sshPubKey + ]; + }); +} -- cgit v1.2.3