mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-15 02:43:24 +03:00
26 lines
444 B
Nix
26 lines
444 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.mobile.boot.stage-1.telnet;
|
|
in
|
|
{
|
|
options.mobile.boot.stage-1.telnet = {
|
|
enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = ''
|
|
Enables telnet. This is insecure.
|
|
'';
|
|
};
|
|
};
|
|
|
|
config.mobile.boot.stage-1 = lib.mkIf cfg.enable {
|
|
init = ''
|
|
TELNET_PORT=23
|
|
telnetd -p ''${TELNET_PORT} -l ${shell} &
|
|
'';
|
|
};
|
|
}
|