diff --git a/modules/server/default.nix b/modules/server/default.nix new file mode 100644 index 00000000..6ab9a0a9 --- /dev/null +++ b/modules/server/default.nix @@ -0,0 +1,22 @@ +{ lib, config, pkgs, ... }: +with lib; +let + psCfg = config.pub-solar; + cfg = config.pub-solar.server; +in +{ + options.pub-solar.server = { + enable = mkEnableOption "Enable server options like sshd"; + }; + + config = mkIf cfg.enable { + pub-solar.core.lite = true; + + services.openssh = { + enable = true; + permitRootLogin = lib.mkForce "prohibit-password"; + passwordAuthentication = true; + openFirewall = true; + }; + }; +}