prepare configuration for server use

This commit is contained in:
Vinzenz Schroeter 2023-09-10 14:12:01 +02:00
parent db67663eb6
commit e65ba7c8a6
12 changed files with 188 additions and 7 deletions

View file

@ -0,0 +1,33 @@
{
config,
pkgs,
lib,
...
}: let
cfg = config.my.server;
in {
imports = [];
options.my.server = {
enable = lib.mkEnableOption "server role";
};
config = lib.mkIf cfg.enable {
services = {
services.openssh.enable = true;
};
programs = {
};
networking.firewall = {
allowedTCPPortRanges = [
{
# ssh
from = 22;
to = 22;
}
];
};
};
}