Connecting to wirelles LAN using iwd and systemd-networkd

Hi! I recently did an Arch install in my second laptop. It doesn’t have much stuff in it (not even a DE), but at least it works. However, some things are unusable, because I’m having a hard time connecting to the internet. I decided to post here because I find it more friendly than other Arch forums.

Worth saying I’m not using NetworkManager and all examples below were made with systemd-networkd.service started/enabled

What have I tried?

I tried following Arch wiki’s steps:

My network interface is listed, and I can see the networks:

$ sudo systemctl start iwd
$ iwctl
NetworkConfigurationEnabled: disabled
StateDirectory: /var/lib/iwd
Version: 2.3
[iwd] device list
Name    Address                  Powered     Adapter   Mode
wlan0   5c:c9:d3:b9:0b:94        on          phy0      station

[iwd] station wlan0 scan
[iwd] station wlan0 get-networks
# my network/wifi appears here
[iwd] station wlan0 connect my_network
# succesfully connects
[iwd] quit

I would expect that I can now connect and do stuff. But:

$ ping
ping: Temporary failure in name resolution
$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00
2 : emp2s0 <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 8c:16:45:5a:8d:18 brd ff:ff:ff:ff:ff:ff
4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000
    link/ether 5c:c9:d3:b9:0b:94 brd ff:ff:ff:ff:ff:ff