diff --git a/hosts/vultr-test/default.nix b/hosts/vultr-test/default.nix index bc6e835..a9340db 100644 --- a/hosts/vultr-test/default.nix +++ b/hosts/vultr-test/default.nix @@ -29,6 +29,7 @@ with lib; system.utils.enable = true; system.gpg.enable = true; system.pass.enable = true; + system.ssh.enable = true; system.sshfs.enable = true; # - Editors and development ------------------ diff --git a/modules/system/ssh.nix b/modules/system/ssh.nix new file mode 100644 index 0000000..5114a61 --- /dev/null +++ b/modules/system/ssh.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, self, ... }: + +let + cfg = config.samfelag.modules.system.ssh; +in +{ + options.samfelag.modules.system.ssh = { + enable = lib.mkEnableOption "ssh"; + }; + config = lib.mkIf cfg.enable { + services.openssh = { + enable = true; + # TODO: Use ssh keys + passwordAuthentication = true; + }; + + networking.firewall.allowedTCPPorts = [ 22 ]; + }; +}