add modules.server

This commit is contained in:
Hendrik Sokolowski 2022-08-22 00:07:09 +02:00
parent fb2e558bf8
commit 7729d42687

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