From fde0f83c00b34bb97d9810d7883364e22d51ea34 Mon Sep 17 00:00:00 2001 From: coolneng Date: Tue, 12 Jul 2022 17:20:18 +0200 Subject: [PATCH] Enable SSH --- sd-image.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sd-image.nix b/sd-image.nix index b8f274b..de980fc 100644 --- a/sd-image.nix +++ b/sd-image.nix @@ -1,7 +1,5 @@ -{ ... }: { - imports = [ - - ]; +{ lib, ... }: { + imports = [ ]; # Add SSH key users.extraUsers.root.openssh.authorizedKeys.keys = [ @@ -10,10 +8,15 @@ users.extraUsers.nixos = { isNormalUser = true; openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFRqINHR7/zc+c3/PuR+NeSsBHXXzBiEtFWSK6QaxQTW coolneng@panacea" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFRqINHR7/zc+c3/PuR+NeSsBHXXzBiEtFWSK6QaxQTW coolneng@panacea" ]; }; # Increase /boot partition size sdImage.firmwareSize = 256; + + # Enable SSH + services.sshd.enable = true; + systemd.services.sshd.wantedBy = lib.mkOverride 40 [ "multi-user.target" ]; + }