1
0
Fork 0
mirror of https://git.oat.zone/dark-firepit/dotfiles synced 2024-05-06 23:46:08 +02:00
git.oat.zone--dark-firepit-.../modules/services/ssh.nix
System administrator 9da0a143ae some refactoring
Co-authored-by: Jill Monoids <oatmealine@disroot.org>
2022-09-05 18:27:22 +02:00

32 lines
640 B
Nix

{ options, config, lib, pkgs, ... }:
with lib;
#with lib.my;
let
cfg = config.modules.services.ssh;
in {
options.modules.services.ssh = {
enable = mkOption {
type = types.bool;
default = false;
description = "Provide system SSH support though OpenSSH.";
};
requirePassword = mkOption {
type = types.bool;
default = true;
};
};
config = mkIf cfg.enable {
services.openssh = {
enable = true;
passwordAuthentication = cfg.requirePassword;
permitRootLogin = "no";
};
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
}