nixpkgs-suyu/nixos/modules
Jörg Thalheim a5872edf2f
nixos/installer: enable sshd by default
Right now the UX for installing NixOS on a headless system is very bad.
To enable sshd without physical steps users have to have either physical
access or need to be very knowledge-able to figure out how to modify the
installation image by hand to put an `sshd.service` symlink in the
right directory in /nix/store. This is in particular a problem on ARM
SBCs (single board computer) but also other hardware where network is
the only meaningful way to access the hardware.

This commit enables sshd by default. This does not give anyone access to
the NixOS installer since by default. There is no user with a non-empty
password or key. It makes it easy however to add ssh keys to the
installation image (usb stick, sd-card on arm boards) by simply mounting
it and adding a keys to `/root/.ssh/authorized_keys`.
Importantly this should not require nix/nixos on the machine that
prepare the installation device and even feasiable on non-linux systems
by using ext4 third party drivers.

Potential new threats: Since this enables sshd by default a
potential bug in openssh could lead to remote code execution. Openssh
has a very good track-record over the last 20 years, which makes it
far more likely that Linux itself would have a remote code execution
vulnerability. It is trusted by millions of servers on many operating
systems to be exposed to the internet by default.

Co-authored-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
2020-09-06 20:26:08 +02:00
..
config Merge pull request #89748 from heinic/krb5-lists 2020-09-03 07:31:22 +01:00
hardware Merge pull request #91296 from cawilliamson/master 2020-08-21 18:27:46 +02:00
i18n/input-method nixos/modules: remove trailing whitespace 2020-08-07 14:45:39 +01:00
installer Merge pull request #95194 from ju1m/nixos-install 2020-09-05 15:31:14 -04:00
misc nixos/nixpkgs.nix: Correct crossSystem default literal 2020-08-26 13:35:35 +02:00
profiles nixos/installer: enable sshd by default 2020-09-06 20:26:08 +02:00
programs programs.zsh: remove unnecessary with 2020-09-03 08:42:24 +02:00
security Merge pull request #91121 from m1cr0man/master 2020-09-06 18:26:22 +02:00
services Merge pull request #91121 from m1cr0man/master 2020-09-06 18:26:22 +02:00
system nixos/systemd: Don't use apply for $PATH 2020-09-03 20:27:55 +02:00
tasks Merge pull request #96042 from rnhmjoj/loaOf 2020-09-02 08:45:37 -04:00
testing nixos/testing: remove remaining coverage-data logic 2020-09-05 16:07:59 +02:00
virtualisation Merge pull request #96042 from rnhmjoj/loaOf 2020-09-02 08:45:37 -04:00
module-list.nix Merge pull request #94917 from ju1m/biboumi 2020-09-02 17:43:27 +02:00
rename.nix nixos/deepin: register as a removed module 2020-09-01 19:42:08 -03:00