kinda make the server module
This commit is contained in:
parent
d52fa1a9ca
commit
436e3d34f9
2 changed files with 44 additions and 1 deletions
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
outputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# important for later, trust me
|
||||
networking.hostName = "sakoserver";
|
||||
}
|
|
@ -1,5 +1,33 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.modules.server;
|
||||
in {
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue