Skip to content

Commit 95e9385

Browse files
committed
modules/nixos/common: add initrd ssh
1 parent 50ab0b3 commit 95e9385

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/nixos/common/security.nix

+6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
{ inputs, pkgs, ... }:
12
{
23
# Make sure that the firewall is enabled, even if it's the default.
34
networking.firewall.enable = true;
45

56
# allow to access emergency shell with a password
67
boot.initrd.systemd.emergencyAccess = "$6$he2fblfl/H7I.kvz$WbSCMXu8ztmqfj5jG4czqvu/rkMHxufxqHgy1urzXFSN.jZB4QiW5lOjR08vk8pZTyim3TT1wFkMaNE9zZ3sc1";
78

9+
boot.initrd.network.ssh = {
10+
enable = true;
11+
authorizedKeyFiles = pkgs.lib.filesystem.listFilesRecursive "${toString inputs.self}/users/keys";
12+
};
13+
814
services.openssh = {
915
hostKeys = [
1016
{

0 commit comments

Comments
 (0)