nixos/modules/server/default.nix

34 lines
607 B
Nix
Raw Normal View History

2023-07-30 20:54:50 +04:00
{
2024-04-03 16:50:45 +04:00
config,
lib,
...
}:
with lib; let
cfg = config.modules.server;
in {
2023-07-30 20:54:50 +04:00
imports = [
];
2024-04-03 16:50:45 +04:00
options.modules.server = {
isServer = mkEnableOption false;
};
config = mkIf cfg.isServer {
# we need this if you say otherwise ill throw you
# into a wall
services.openssh = {
enable = true;
settings = {
# disable this NEVER enable it
PermitRootLogin = "no";
# its so easy to use keys your grandmother could use it
PasswordAuthentication = false;
ports = [
69
];
openFirewall = true;
};
};
};
2023-07-30 20:54:50 +04:00
}