Enable SSH

This commit is contained in:
coolneng 2022-07-12 17:20:18 +02:00
parent 7f81be1bb3
commit fde0f83c00
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 8 additions and 5 deletions

View File

@ -1,7 +1,5 @@
{ ... }: { { lib, ... }: {
imports = [ imports = [ <nixpkgs/nixos/modules/installer/sd-card/sd-image-aarch64.nix> ];
<nixpkgs/nixos/modules/installer/sd-card/sd-image-aarch64.nix>
];
# Add SSH key # Add SSH key
users.extraUsers.root.openssh.authorizedKeys.keys = [ users.extraUsers.root.openssh.authorizedKeys.keys = [
@ -10,10 +8,15 @@
users.extraUsers.nixos = { users.extraUsers.nixos = {
isNormalUser = true; isNormalUser = true;
openssh.authorizedKeys.keys = [ 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 # Increase /boot partition size
sdImage.firmwareSize = 256; sdImage.firmwareSize = 256;
# Enable SSH
services.sshd.enable = true;
systemd.services.sshd.wantedBy = lib.mkOverride 40 [ "multi-user.target" ];
} }