self-hosting/modules/openssh.nix

21 lines
488 B
Nix
Raw Permalink Normal View History

{ config, lib, ... }:
with lib;
2025-09-25 18:44:04 +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";
2023-10-17 22:36:27 +02:00
users.users.root.openssh.authorizedKeys.keyFiles = [
../ssh_keys/froidmpa-desktop.pub
2025-09-25 18:44:04 +02:00
../ssh_keys/phfroidmont-stellaris.pub
2023-10-17 22:36:27 +02:00
../ssh_keys/elios-desktop.pub
];
};
2021-07-15 17:09:32 +02:00
}