self-hosting/modules/openssh.nix

14 lines
428 B
Nix
Raw Normal View History

{ config, lib, ... }:
with lib;
2023-07-10 19:19:25 +02:00
let cfg = config.custom.services.openssh;
in {
options.custom.services.openssh = { enable = mkEnableOption "openssh"; };
config = mkIf cfg.enable {
services.openssh.enable = true;
2023-07-10 19:19:25 +02:00
services.openssh.settings.PermitRootLogin = "prohibit-password";
users.users.root.openssh.authorizedKeys.keyFiles =
[ ../ssh_keys/froidmpa-desktop.pub ../ssh_keys/froidmpa-laptop.pub ];
};
2021-07-15 17:09:32 +02:00
}