DNS not resolving during nixos builds

dig output:

[nix-shell:~]$ dig github.com

; <<>> DiG 9.20.15 <<>> github.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44757
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;github.com.                    IN      A

;; ANSWER SECTION:
github.com.             17      IN      A       140.82.121.3

;; Query time: 8 msec
;; SERVER: 1.1.1.1#53(1.1.1.1) (UDP)
;; WHEN: Sun Dec 21 00:41:48 CET 2025
;; MSG SIZE  rcvd: 55

/etc/resolv.conf

# Generated by resolvconf
nameserver 1.1.1.1
nameserver 1.0.0.1
options edns0

/etc/nsswitch.conf

passwd:    files systemd
group:     files [success=merge] systemd
shadow:    files systemd
sudoers:   files

hosts:     mymachines mdns4_minimal [NOTFOUND=return] files myhostname dns mdns4
networks:  files

ethers:    files
services:  files
protocols: files
rpc:       files