nixpkgs/nixos/modules
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
..
config nixos/console: inird -> initrd 2022-04-30 14:43:09 -07:00
hardware config.allowUnfree: define as option 2022-05-02 17:20:25 +03:00
i18n/input-method nixos/fcitx5: add the setting of RIME_DATA_DIR and options for rime-data 2022-04-25 13:39:19 +08:00
installer installation-cd: add calamares-plasma5 cd 2022-05-03 12:19:20 -04:00
misc Merge staging-next into staging 2022-04-08 18:11:40 +00:00
profiles Merge pull request #169113 from ElvishJerricco/systemd-stage-1-installer-tests 2022-04-30 13:18:57 -07:00
programs nixos/thefuck: rename variable and move fishInitScript into its own variable 2022-05-01 18:08:36 +02:00
security Merge pull request #164025 from lukegb/pam-ussh 2022-04-11 01:25:45 +01:00
services nixos/ssh: remove empty host key files before generating new ones 2022-05-03 22:09:43 -07:00
system Merge pull request #171247 from K900/systemd-boot-coreutils-mktemp 2022-05-03 19:15:55 +02:00
tasks Merge pull request #170123 from ElvishJerricco/systemd-shutdown-ramfs-fixup 2022-04-28 20:17:23 -04:00
testing nixos/*qemu*: Add systemd initrd support 2022-04-30 20:47:42 +02:00
virtualisation nixos/virtualisation.oci-containers: Use podman as the default backend 2022-05-03 14:50:43 +12:00
module-list.nix nixos/cloudflare-dyndns: init 2022-05-01 16:50:31 -07:00
rename.nix nixos/ssmtp: drop module 2022-04-17 00:44:50 +02:00