20 lines
382 B
Nix
20 lines
382 B
Nix
{ 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 ];
|
|
};
|
|
}
|