From dbd44077549477d6e1dbf974b79fe8d7800592c4 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Wed, 18 Sep 2024 13:07:17 -0500
Subject: [PATCH] moved openssh config to common

---
 enviroments/common/default.nix  | 13 +++++++++++++
 hosts/defiant/configuration.nix | 11 -----------
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/enviroments/common/default.nix b/enviroments/common/default.nix
index f0231c3..99f3e5a 100644
--- a/enviroments/common/default.nix
+++ b/enviroments/common/default.nix
@@ -29,6 +29,19 @@
 
   users.groups.users = {};
 
+  services = {
+    openssh = {
+      enable = true;
+      ports = [ 22 ];
+      settings = {
+        PasswordAuthentication = false;
+        AllowUsers = [ "leyla" ]; # Allows all users by default. Can be [ "user1" "user2" ]
+        UseDns = true;
+        X11Forwarding = false;
+      };
+    };
+  };
+
   sops = {
     defaultSopsFile = ../../secrets/secrets.yaml;
     defaultSopsFormat = "yaml";
diff --git a/hosts/defiant/configuration.nix b/hosts/defiant/configuration.nix
index 6c2c61f..9e4a1e6 100644
--- a/hosts/defiant/configuration.nix
+++ b/hosts/defiant/configuration.nix
@@ -51,17 +51,6 @@
       excludePackages = [ pkgs.xterm ];
     };
 
-    openssh = {
-      enable = true;
-      ports = [ 22 ];
-      settings = {
-        PasswordAuthentication = false;
-        AllowUsers = [ "leyla" ]; # Allows all users by default. Can be [ "user1" "user2" ]
-        UseDns = true;
-        X11Forwarding = false;
-      };
-    };
-
     nfs.server = {
       enable = true;
       exports = ''