diff --git a/guix/build/activation.scm b/guix/build/activation.scm index 895f2bca5bb7181a519bbc50dedb26595cca09ce..267c592b524056ffabd56a2e6db399c35a3bc9dc 100644 --- a/guix/build/activation.scm +++ b/guix/build/activation.scm @@ -73,7 +73,11 @@ (define* (add-user name group `("-G" ,(string-join supplementary-groups ",")) '()) ,@(if comment `("-c" ,comment) '()) - ,@(if home `("-d" ,home "--create-home") '()) + ,@(if home + (if (file-exists? home) + `("-d" ,home) ; avoid warning from 'useradd' + `("-d" ,home "--create-home")) + '()) ,@(if shell `("-s" ,shell) '()) ,@(if password `("-p" ,password) '()) ,name)))