diff --git a/system/README.md b/system/README.md new file mode 100644 index 0000000..82af445 --- /dev/null +++ b/system/README.md @@ -0,0 +1,18 @@ +# System notes + +## Networking + +To setup networking without any network managers, dhcp client, etc. + +``` +# Add an address +ip address add 192.168.0.120/24 broadcast + dev eth0 + +# Add a route +ip route add default via 192.168.0.1 dev eth0 +#or s|default|192.168.0.0/24| + +# Set up DNS in /etc/resolv.conf +# nameserver 192.168.0.1 +# nameserver 8.8.8.8 +``` diff --git a/system/etc/connman/main.conf b/system/etc/connman/main.conf index 40bfd84..f1fb67c 100644 --- a/system/etc/connman/main.conf +++ b/system/etc/connman/main.conf @@ -3,6 +3,6 @@ [General] AllowHostnameUpdates=false -AllowDomainnameUpdates = false +AllowDomainnameUpdates=false PreferredTechnologies=ethernet,wifi SingleConnectedTechnology=true diff --git a/system/etc/dhcpcd.conf b/system/etc/dhcpcd.conf new file mode 100644 index 0000000..0613ba8 --- /dev/null +++ b/system/etc/dhcpcd.conf @@ -0,0 +1,20 @@ +# Typical config for static IP with dhcpcd +# https://wiki.archlinux.org/title/Dhcpcd + +interface eth0 +static ip_address=192.168.0.10/24 +static routers=192.168.0.1 +static domain_name_servers=192.168.0.1 8.8.8.8 + +# ------------------------------------------ # +# To setup fallback profile: +# +# define static profile +# profile static_eth0 +# static ip_address=192.168.1.23/24 +# static routers=192.168.1.1 +# static domain_name_servers=192.168.1.1 +# +# fallback to static profile on eth0 +# interface eth0 +# fallback static_eth0 diff --git a/system/etc/iwd/main.conf b/system/etc/iwd/main.conf new file mode 100644 index 0000000..680093e --- /dev/null +++ b/system/etc/iwd/main.conf @@ -0,0 +1,18 @@ +# Start dhcpcd service on a specified interface, eg. `dhcpcd -B eth0` +# so that it doesn't interfere with iwd's own dhcp client + +[General] +EnableNetworkConfiguration=true +UseDefaultInterface=true +# Only use this when the specified config for the interface has +# `AlwaysRandomizeAddress=true` in it, +# eg. /var/lib/iwd/mywifi.psk +#AddressRandomization=true + +[Network] +RoutePriorityOffset=200 +EnableIPv6=true +NameResolvingService=resolvconf + +[Scan] +DisablePeriodicScan=true diff --git a/system/etc/network/interfaces b/system/etc/network/interfaces new file mode 100644 index 0000000..3df9057 --- /dev/null +++ b/system/etc/network/interfaces @@ -0,0 +1,17 @@ +# Alpine Linux dhcp configuration for static IP +# Also manually set DNS in /etc/resolv.conf +# eg. +# nameserver 192.168.0.1 +# nameserver 8.8.8.8 + +auto lo +iface lo inet loopback + +auto eth0 +iface eth0 inet static + address 192.168.0.147 + netmask 255.255.255.0 + gateway 192.168.0.1 +# For default dynamic IP address +#auto eth0 +#iface eth0 inet dhcp diff --git a/system/usr/lib/elogind/system-sleep/lock b/system/usr/lib/elogind/system-sleep/lock index 3a6a8df..efe133a 100644 --- a/system/usr/lib/elogind/system-sleep/lock +++ b/system/usr/lib/elogind/system-sleep/lock @@ -2,7 +2,7 @@ # Lock before suspend integration with elogind -username=follie +username=[username] export XAUTHORITY="/run/user/1000/Xauthority" export DISPLAY=":0" case $1/$2 in