From 8863fac7a3f4c00ac3cf2dc8b7f0ebee74705157 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Tue, 22 Nov 2022 07:07:51 -0300 Subject: etc/guix/system.scm: Add "whoami" variable --- etc/guix/system.scm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/etc/guix/system.scm b/etc/guix/system.scm index 50de690..4269ad6 100644 --- a/etc/guix/system.scm +++ b/etc/guix/system.scm @@ -26,6 +26,9 @@ (xyz euandreh queue)) (heredoc:enable-syntax) +(define whoami "andreh") + + (operating-system (kernel linux) (initrd microcode-initrd) @@ -59,7 +62,7 @@ (append (list (user-account - (name "andreh") + (name whoami) (comment "EuAndreh") (group "users") (supplementary-groups '("netdev" "audio" "video" "wheel" "kvm" "docker")))) @@ -113,10 +116,10 @@ (openssh-configuration (password-authentication? #f) (authorized-keys - `(("andreh" ,(local-file - (string-append (or (getenv "XDG_CONFIG_HOME") - (string-append (getenv "HOME") "/.ssh")) - "/ssh/id_rsa.pub"))))) + `((,whoami ,(local-file + (string-append (or (getenv "XDG_CONFIG_HOME") + (string-append (getenv "HOME") "/.ssh")) + "/ssh/id_rsa.pub"))))) (extra-content #"- ClientAliveInterval 30 ClientAliveCountMax 20 -- cgit v1.2.3