diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-06-08 21:05:21 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-06-10 16:18:26 +0530 |
| commit | 38ccadbc876ab9ae4f27d3e84a31f57bee10af3b (patch) | |
| tree | 69ea2d116f6a0b621f762cc94d86b15bba11e448 /modules | |
| parent | 7a8a09cdc21939fc2e6bc2c762e9b89cf87feb91 (diff) | |
| download | homeserver-nixos-config-38ccadbc876ab9ae4f27d3e84a31f57bee10af3b.tar.gz homeserver-nixos-config-38ccadbc876ab9ae4f27d3e84a31f57bee10af3b.zip | |
Switch to ssh key
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/network/default.nix | 4 | ||||
| -rw-r--r-- | modules/network/ssh.nix | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/modules/network/default.nix b/modules/network/default.nix index 444f53c..6a3ab69 100644 --- a/modules/network/default.nix +++ b/modules/network/default.nix @@ -7,9 +7,7 @@ in { networking = { hostName = "bacchus"; - firewall = { - enable = true; - }; + firewall.enable = true; networkmanager = { enable = true; diff --git a/modules/network/ssh.nix b/modules/network/ssh.nix index e4e5b2a..573bdf4 100644 --- a/modules/network/ssh.nix +++ b/modules/network/ssh.nix @@ -5,7 +5,10 @@ in { services.sshd.enable = true; # Auth - # TODO: dont allow via password - # openssh.authorizedKeys.keys = private.ssh.authorizedKeys; - services.openssh.settings.PermitRootLogin = "yes"; + users.users.bacchus.openssh.authorizedKeys.keys = private.ssh.authorizedKeys; + services.openssh.settings = { + PermitRootLogin = "no"; + PasswordAuthentication = false; + ChallengeResponseAuthentication = false; + }; } |
