From 077d466bcd46420d0fa7f3a16b4e00c87ca69d2f Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 2 Nov 2021 10:32:12 +0100 Subject: [PATCH] Add ssh keys --- configuration.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/configuration.nix b/configuration.nix index 037d654..f25efc7 100644 --- a/configuration.nix +++ b/configuration.nix @@ -74,9 +74,25 @@ # Define a user account. Don't forget to set a password with ‘passwd’. users.users.lx = { isNormalUser = true; - extraGroups = [ "wheel" "video" ]; # Enable ‘sudo’ for the user. + extraGroups = [ + "wheel" # Enable ‘sudo’ for the user. + "video" # Having fun with links -g + ]; + openssh.authorizedKeys.keys = [ + # Keys for accessing nodes from outside + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJpaBZdYxHqMxhv2RExAOa7nkKhPBOHupMP3mYaZ73w9 lx@lindy" + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIDdVbA9fEdqSr5UJ77NnoIqDTVp8ca5kHExhZYI4ecBExFJfonJllXMBN9KdC4ukxtY8Ug47PcMOfMaTBZQc+e+KpvDWpkBt15Xpem3RCxmMBES79sLL7LgtAdBXc5mNaCX8EOEVixWKdarjvxRyf6py6the51G5muaiMpoj5fae4ZpRGjhGTPefzc7y7zRWBUUZ8pYHW774BIaK6XT9gn3hyHV+Occjl/UODXvodktk55YtnuPi8adXTYEsHrVVz8AkFhx+cr0U/U8vtQnsTrZG+JmgQLqpXVs0RDw5bE1RefEbMuYNKxutYKUe3L+ZJtDe0M0MqOFI8a4F5TxP5 katchup@konata" + # SSH access between nodes + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINOxa/9nQfPOcUPdpAhiz3s73O/eCB8tevei/VKPyiIV lx@caribou" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOrlp9pmE4cTirzBAYRfQP5DH2OXzVsKZe7lRO+MXg4Z lx@carcajou" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF+2D98laBfRGF90PlOlAo+MKmMnh1kX0Bx6Pzhf4Ym9 lx@cariacou" + ]; }; + users.extraUsers.root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJpaBZdYxHqMxhv2RExAOa7nkKhPBOHupMP3mYaZ73w9 lx@lindy" + ]; + # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [