nix-configs/old-conf/nixos-modules/services/ssh.nix
Lucy Hochkamp 83de52d5db Add 'old-conf/' from commit '62a64a79a8'
git-subtree-dir: old-conf
git-subtree-mainline: 4667974392
git-subtree-split: 62a64a79a8
2025-11-21 13:33:06 +01:00

14 lines
465 B
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.ragon.services.ssh;
pubkeys = import ../../data/pubkeys.nix;
in
{
options.ragon.services.ssh.enable = lib.mkEnableOption "Enables sshd";
config = lib.mkIf cfg.enable {
services.openssh.settings.PermitRootLogin = "without-password";
services.openssh.enable = true;
services.openssh.settings.PasswordAuthentication = false;
users.users.root.openssh.authorizedKeys.keys = pubkeys.ragon.user;
};
}