aboutsummaryrefslogtreecommitdiff
path: root/profiles/core
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2025-08-12 09:47:47 -0700
committerFranck Cuny <franck@fcuny.net>2025-08-12 09:47:47 -0700
commit9b4023fb9d8ff3e0005595318ec1e1ac181a6bdf (patch)
treea3ff00eee490ff7f5b69debed5445be4db08bff6 /profiles/core
parentimport locale (diff)
downloadinfra-9b4023fb9d8ff3e0005595318ec1e1ac181a6bdf.tar.gz
profile for sshd
Diffstat (limited to 'profiles/core')
-rw-r--r--profiles/core/ssh.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/profiles/core/ssh.nix b/profiles/core/ssh.nix
new file mode 100644
index 0000000..f8c899a
--- /dev/null
+++ b/profiles/core/ssh.nix
@@ -0,0 +1,19 @@
+{ lib, ... }:
+{
+ services.openssh = {
+ enable = lib.mkDefault true;
+ settings = {
+ PasswordAuthentication = lib.mkForce false;
+ KbdInteractiveAuthentication = lib.mkForce false;
+
+ PermitRootLogin = lib.mkForce "prohibit-password";
+ };
+ openFirewall = lib.mkDefault true;
+ hostKeys = [
+ {
+ path = "/etc/ssh/ssh_host_ed25519_key";
+ type = "ed25519";
+ }
+ ];
+ };
+}