add modules.server

This commit is contained in:
Hendrik Sokolowski 2022-08-22 00:07:09 +02:00
parent aa4391161d
commit 6e8676904b

View file

@ -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;
};
};
}