added ssh
This commit is contained in:
26
modules/system/services/ssh.nix
Normal file
26
modules/system/services/ssh.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.settings.services.ssh;
|
||||
in {
|
||||
options = {
|
||||
settings.services.ssh.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enable ssh service
|
||||
'';
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [ 22 ];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user