Skip to content

Commit

Permalink
modules/nixos/common: add initrd ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
zowoq committed Aug 2, 2024
1 parent d486e79 commit 042e068
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/nixos/common/security.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
{ inputs, pkgs, ... }:
{
# Make sure that the firewall is enabled, even if it's the default.
networking.firewall.enable = true;

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

boot.initrd.network.ssh = {
enable = true;
authorizedKeyFiles = pkgs.lib.filesystem.listFilesRecursive "${toString inputs.self}/users/keys";
};

services.openssh = {
hostKeys = [
{
Expand Down

0 comments on commit 042e068

Please sign in to comment.