2020-10-01 15:46:04 -07:00
|
|
|
{ options, config, lib, ... }:
|
2019-08-06 10:56:54 -07:00
|
|
|
|
2020-03-28 22:48:43 -07:00
|
|
|
with lib;
|
2020-10-01 15:46:04 -07:00
|
|
|
with lib.my;
|
|
|
|
let cfg = config.modules.services.ssh;
|
|
|
|
in {
|
2020-03-28 22:48:43 -07:00
|
|
|
options.modules.services.ssh = {
|
2020-10-01 15:46:04 -07:00
|
|
|
enable = mkBoolOpt false;
|
2019-08-06 10:56:54 -07:00
|
|
|
};
|
|
|
|
|
2020-10-01 15:46:04 -07:00
|
|
|
config = mkIf cfg.enable {
|
2020-03-28 22:48:43 -07:00
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
2020-10-01 15:46:04 -07:00
|
|
|
challengeResponseAuthentication = false;
|
2020-03-28 22:48:43 -07:00
|
|
|
passwordAuthentication = false;
|
|
|
|
};
|
|
|
|
|
2020-10-01 15:46:04 -07:00
|
|
|
user.openssh.authorizedKeys.keys = [
|
2020-03-28 22:48:43 -07:00
|
|
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8Tl2pj6CPBV3V72cohPhn+k0a/Na3cOrbmUtFC7rR7icWocSs1S1cSrP3sPLwUqRh3+zfIuLXTrTv3gj8Xvg8WELOspzsiYeAtbcHrnWnx/a7xzYvFyT9/8hkiGM/F6w7IuKEk+AZW34vARSgRPJ1FdH8NbPKJ8ay9zW9XB9YJGnbzIRmsVVpQ8l6Fh8ZqRjZfC1ea7hns8+HgjPrIHFb+S3qZZiwU4Gc8aWJy9ziwwkllEsSchv3aigYA3eOeW0FUQFiKsLGxbX2b2b3d6jFO4Pu+dMSen0h5IzBo0nh7UADSfJPdwbZaMuJzviKe2y6zg6jaM9XRIhLBT6bftDr henrik@lissner.net"
|
|
|
|
];
|
|
|
|
};
|
2019-08-06 10:56:54 -07:00
|
|
|
}
|