Files
nixos-configs/hosts/backwards/modules/ssh/default.nix
T

33 lines
487 B
Nix

{ lib, config, ... }:
let
enabled = config.mod.ssh.enable;
in
{
options = {
mod.ssh = {
enable = lib.mkEnableOption "enable ssh module";
};
};
config = lib.mkIf enabled {
home-manager.users.alex = {
programs.ssh = {
enable = true;
};
};
services = {
openssh = {
enable = true;
ports = [ 1122 ];
};
};
networking = {
firewall = {
allowedTCPPorts = [ 1122 ];
};
};
};
}