Added ssh

This commit is contained in:
marc
2024-02-03 17:27:40 +01:00
parent e6b0e03a8c
commit 06b2440df5
2 changed files with 20 additions and 0 deletions

View File

@@ -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 ------------------

19
modules/system/ssh.nix Normal file
View File

@@ -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 ];
};
}