kinda make the server module

This commit is contained in:
Sakooooo 2024-04-03 12:50:45 +00:00
parent d52fa1a9ca
commit 436e3d34f9
2 changed files with 44 additions and 1 deletions

View file

@ -0,0 +1,15 @@
{
config,
pkgs,
lib,
inputs,
outputs,
...
}: {
imports = [
./hardware-configuration.nix
];
# important for later, trust me
networking.hostName = "sakoserver";
}

View file

@ -1,5 +1,33 @@
{ {
config,
lib,
...
}:
with lib; let
cfg = config.modules.server;
in {
imports = [ imports = [
]; ];
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;
};
};
};
} }