diff --git a/hosts/sakoserver/configuration.nix b/hosts/sakoserver/configuration.nix index e69de29b..efa4ab18 100644 --- a/hosts/sakoserver/configuration.nix +++ b/hosts/sakoserver/configuration.nix @@ -0,0 +1,15 @@ +{ + config, + pkgs, + lib, + inputs, + outputs, + ... +}: { + imports = [ + ./hardware-configuration.nix + ]; + + # important for later, trust me + networking.hostName = "sakoserver"; +} diff --git a/modules/server/default.nix b/modules/server/default.nix index aa3564dd..76a2a9f7 100644 --- a/modules/server/default.nix +++ b/modules/server/default.nix @@ -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; + }; + }; + }; }