liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 02cf2c6b807913f90f6ca831213eace4799a6765
parent b0709a644345a84c3458d7f987495d4a9995f6f0
Author: Daniel Barlow <dan@telent.net>
Date:   Sun,  4 Feb 2024 18:10:58 +0000

add ssh keys in recovry image

Diffstat:
Mexamples/recovery.nix | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/examples/recovery.nix b/examples/recovery.nix @@ -94,6 +94,14 @@ in rec { # the password is "secret". Use mkpasswd -m sha512crypt to # create this hashed password string passwd = "$6$y7WZ5hM6l5nriLmo$5AJlmzQZ6WA.7uBC7S8L4o19ESR28Dg25v64/vDvvCN01Ms9QoHeGByj8lGlJ4/b.dbwR9Hq2KXurSnLigt1W1"; + + + openssh.authorizedKeys.keys = + let fromBuild = + (builtins.readFile + ((builtins.toPath (builtins.getEnv "HOME")) + "/.ssh/authorized_keys") + ); + in lib.splitString "\n" fromBuild; }; defaultProfile.packages = with pkgs; [