From 7729d426872f6c1b203e0a8889ae1941965cc834 Mon Sep 17 00:00:00 2001 From: Hendrik Sokolowski Date: Mon, 22 Aug 2022 00:07:09 +0200 Subject: [PATCH] add modules.server --- modules/server/default.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 modules/server/default.nix 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; + }; + }; +}