backwards: Add ssh module

This commit is contained in:
Alexander Heldt
2024-08-15 14:42:17 +02:00
parent 3651fa4146
commit 60ab66b11c
3 changed files with 35 additions and 3 deletions

View File

@@ -0,0 +1,32 @@
{ 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 ];
};
};
};
}