1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-27 01:44:41 +03:00
mobile-nixos/modules/initrd-telnet.nix
2018-06-17 17:50:32 +00:00

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} &
'';
};
}