summaryrefslogtreecommitdiff
path: root/nixos/common.nix
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-10-23 22:08:00 +0200
committerAlex Auvolat <alex@adnab.me>2023-10-23 22:08:00 +0200
commitf5ee7edf7d3d88b4f93d5f0e330e260f1d232c31 (patch)
treea1d7481774e226efd9f0795099ff500f2ba7dae5 /nixos/common.nix
parent7630d5877f893414524e33479b1c49bacce3c499 (diff)
downloaduser-config-f5ee7edf7d3d88b4f93d5f0e330e260f1d232c31.tar.gz
user-config-f5ee7edf7d3d88b4f93d5f0e330e260f1d232c31.zip
add openssh access
Diffstat (limited to 'nixos/common.nix')
-rw-r--r--nixos/common.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/nixos/common.nix b/nixos/common.nix
index 6868efa..7154465 100644
--- a/nixos/common.nix
+++ b/nixos/common.nix
@@ -59,8 +59,13 @@ in
};
services.resolved.enable = false;
+ networking.extraHosts = ''
+ 201:8c16:538b:891c:96cb:c8f6:40dd:125d lindy
+ '';
+
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [
+ 2022 # openssh
22000 # syncthing
];
networking.firewall.allowedUDPPorts = [
@@ -118,6 +123,20 @@ in
"dialout"
"kvm"
];
+ openssh.authorizedKeys.keys = [
+ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJpaBZdYxHqMxhv2RExAOa7nkKhPBOHupMP3mYaZ73w9"
+ ];
+ };
+
+ # -------------------- yea openssh ---------------------
+
+ services.openssh = {
+ enable = true;
+ ports = [ 2022 ];
+ settings = {
+ PermitRootLogin = "no";
+ PasswordAuthentication = false;
+ };
};
# -------------------- packages ---------------------