help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Edits to `etc/resolv.conf` being overwritten


From: Gary Johnson
Subject: Re: Edits to `etc/resolv.conf` being overwritten
Date: Wed, 07 Apr 2021 10:34:28 -0400

Bone Baboon <bone.baboon@disroot.org> writes:

> Thank you for the explanation and detailed examples.
>
> I now have my system configuration providing the contents of
> `/etc/resolv.conf` with a service.
>
> However the contents of `/etc/resolv.conf` is still being overwritten
> with entries for my internet service provider's DNS.  After some testing
> it appears to be happening when I run this command `sudo dhclient
> <wireless-interface>`.

That's unfortunate to hear. Perhaps you could check out the
network-manager-service-type? I believe it includes a parameter that
lets you tell NetworkManager not to overwrite /etc/resolv.conf. The
command-line interface for NetworkManager is called nmtui. This is what
I use on my machine.

> I also appreciate the `hosts-file` example you shared as I am thinking
> about using `https://github.com/StevenBlack/hosts` as a block list.  In
> this case the contents of `my-host-aliases` would be very large.  With
> Guile how would I have the definition of `my-host-aliases` in it's own
> file and import and use it in my system configuration?

(use-modules (ice-9 rdelim))

(define my-host-aliases (with-input-from-file "/path/to/your/file"
                                               (lambda () (read-delimited ""))))

Happy hacking,
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
=======================================================================
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]