Ian Eure <[email protected]> writes:
> Hi Oleander,
>
> Oleander via <[email protected]> writes:
>
>> How can I enter the sudo password before `guix pull` runs when updating with
>> `guix pull && sudo
>> guix system reconfigure config.scm`?
>>
>
> I don’t believe there’s a reasonable way to do what you want. I think your
> best option is to
> configure your sudoers file so your user is allowed to run `guix system
> reconfigure' command without
> needing a password. See the sudoers(5) man page and `sudoers-file' field of
> the operating-system
> record.
>
> Thanks,
>
> — Ian
Good to know that Ian, thank you.
My personal approach is to remove the password prompt timeout ↓ in the
sudoers-file and just have the command chain wait for the password when
done pulling. Not time-efficient at all, but completely effortless for
me.
(define-module (suweren commons sudoers)
#:use-module (guix gexp))
(define-public %sudoers-specification*
(let ((content (string-append "root ALL=(ALL) ALL \n"
"%wheel ALL=(ALL) ALL \n"
"Defaults passwd_timeout=0 \n")))
(plain-file "sudoers" content)))