nixpkgs/nixos
Daniel Fullmer ad38a2a646 nixos/ssh: remove empty host key files before generating new ones
In a previous PR [1], the conditional to generate a new host key file
was changed to also include the case when the file exists, but has zero
size. This could occur when the system is uncleanly powered off shortly
after first boot.

However, ssh-keygen prompts the user before overwriting a file. For
example:

$ touch hi
$ ssh-keygen -f hi
Generating public/private rsa key pair.
hi already exists.
Overwrite (y/n)?

So, lets just try to remove the empty file (if it exists) before running
ssh-keygen.

[1] https://github.com/NixOS/nixpkgs/pull/141258
2022-05-03 22:09:43 -07:00
..
doc Merge pull request #161788 from vlinkz/calamares-nixos 2022-05-03 22:55:24 +02:00
lib nixos: Fix up systemd shutdown ramfs 2022-04-28 14:12:14 -04:00
maintainers openstack-image-zfs: start copying the channel now that we've mostly got the expressions down 2022-04-07 15:28:28 -04:00
modules nixos/ssh: remove empty host key files before generating new ones 2022-05-03 22:09:43 -07:00
tests Merge pull request #169802 from NinjaTrappeur/nin/prosody012 2022-05-03 11:04:17 +02:00
COPYING
default.nix nixos: Make system.build.vm a standard attribute based on vmVariant 2021-12-17 14:49:31 +01:00
README
release-combined.nix nixos/release: add podman, oci-containers.podman to tested 2022-05-03 19:42:33 +10:00
release-small.nix nixos/release: disable nfs3.simple 2022-03-03 06:34:59 +10:00
release.nix nixos/release: add calamares installer 2022-05-03 12:19:20 -04:00

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
https://nixos.org/nixos and in the manual in doc/manual.