add modules.server
This commit is contained in:
parent
aa4391161d
commit
6e8676904b
22
modules/server/default.nix
Normal file
22
modules/server/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue