self-hosting/modules/openssh.nix

21 lines
438 B
Nix
Raw Normal View History

{ config, lib, ... }:
with lib;
let
cfg = config.custom.services.openssh;
in
2021-07-15 17:09:32 +02:00
{
options.custom.services.openssh = {
enable = mkEnableOption "openssh";
};
config = mkIf cfg.enable {
services.openssh.enable = true;
services.openssh.permitRootLogin = "prohibit-password";
users.users.root.openssh.authorizedKeys.keyFiles = [
2022-11-07 04:33:35 +01:00
../ssh_keys/froidmpa-desktop.pub
../ssh_keys/froidmpa-laptop.pub
];
};
2021-07-15 17:09:32 +02:00
}