summaryrefslogtreecommitdiff
path: root/programs/ssh
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-06-23 22:33:44 -0400
committerFreya Murphy <freya@freyacat.org>2025-06-23 22:33:44 -0400
commit328c741b1aac74020412e99e0dca7c728dbc92fa (patch)
tree461f4ebcd3252d542749a34668defd62de356c73 /programs/ssh
parentremoved unused packages (diff)
downloaddotfiles-nix-328c741b1aac74020412e99e0dca7c728dbc92fa.tar.gz
dotfiles-nix-328c741b1aac74020412e99e0dca7c728dbc92fa.tar.bz2
dotfiles-nix-328c741b1aac74020412e99e0dca7c728dbc92fa.zip
refactor
Diffstat (limited to 'programs/ssh')
-rw-r--r--programs/ssh/config12
-rw-r--r--programs/ssh/default.nix45
2 files changed, 0 insertions, 57 deletions
diff --git a/programs/ssh/config b/programs/ssh/config
deleted file mode 100644
index 5ae97b6..0000000
--- a/programs/ssh/config
+++ /dev/null
@@ -1,12 +0,0 @@
-Match Host * exec "gpg-connect-agent UPDATESTARTUPTTY /bye"
-
-Host *.in.freya.cat cid.freya.cat alivemc.net
- User root
-
-Host *.cs.rit.edu
- User tam2214
-
-Host *
- HostkeyAlgorithms +ssh-rsa
- PubkeyAcceptedKeyTypes +ssh-rsa
- KexAlgorithms -sntrup761x25519-sha512@openssh.com
diff --git a/programs/ssh/default.nix b/programs/ssh/default.nix
deleted file mode 100644
index b6ecb1d..0000000
--- a/programs/ssh/default.nix
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- config,
- lib,
- ...
-}: {
- # ssh config
- home-manager.users.${config.user} = {
- programs.ssh = {
- enable = true;
- extraConfig = lib.fileContents ./config;
- };
- };
-
- # sshd
- services.openssh = {
- enable = true;
- ports = [22];
- settings = {
- PasswordAuthentication = false;
- KbdInteractiveAuthentication = false;
- UseDns = true;
- X11Forwarding = false;
- PermitRootLogin = "no";
- };
- };
-
- # allow ssh port
- networking.firewall.allowedTCPPorts = [22];
-
- # ban evil
- services.fail2ban = {
- enable = true;
- ignoreIP = [
- # freyanet
- "10.0.0.0/14"
- ];
- };
-
- # add authorized keys
- users.users.${config.user} = {
- openssh.authorizedKeys.keyFiles = [
- ../../files/keys/ssh.pub
- ];
- };
-}