os/modules/server/default.nix

36 lines
690 B
Nix

{
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;
nix.gc.automatic = true;
services = {
lldpd.enable = true;
openssh = {
enable = true;
openFirewall = true;
settings = {
PermitRootLogin = lib.mkForce "prohibit-password";
PasswordAuthentication = true;
};
};
};
networking.networkmanager.enable = lib.mkForce false;
pub-solar.nextcloud.enable = lib.mkForce false;
};
}