modules: services: put modules into folders
This commit is contained in:
parent
836b54b8eb
commit
ac90c5b11a
29 changed files with 28 additions and 28 deletions
23
modules/services/ssh-server/default.nix
Normal file
23
modules/services/ssh-server/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# An SSH server, using 'mosh'
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.services.ssh-server;
|
||||
in
|
||||
{
|
||||
options.my.services.ssh-server = {
|
||||
enable = lib.mkEnableOption "SSH Server using 'mosh'";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.openssh = {
|
||||
# Enable the OpenSSH daemon.
|
||||
enable = true;
|
||||
# Be more secure
|
||||
permitRootLogin = "no";
|
||||
passwordAuthentication = false;
|
||||
};
|
||||
|
||||
# Opens the relevant UDP ports.
|
||||
programs.mosh.enable = true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue