From 0256d36588ebe379cc9ed00e710b8da75120e63f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 29 Nov 2023 13:53:31 +0100 Subject: [PATCH 1/3] fix server networkd initrd --- modules/initrd-networking.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/initrd-networking.nix b/modules/initrd-networking.nix index 74e55f5..2c4d05f 100644 --- a/modules/initrd-networking.nix +++ b/modules/initrd-networking.nix @@ -33,6 +33,7 @@ in config = { # Hack so that network is considered up by boot.initrd.network and postCommands gets executed. boot.kernelParams = [ "ip=127.0.0.1:::::lo:none" ]; + boot.initrd.systemd.enable = false; boot.initrd.network = { enable = true; @@ -47,14 +48,15 @@ in authorizedKeys = config.users.users.root.openssh.authorizedKeys.keys; }; postCommands = '' - ip link set dev eth0 up + ip addr + ip link set dev enp6s0 up - ip addr add ${cfg.ipv4.address}/${cfg.ipv4.cidr} dev eth0 - ip route add ${cfg.ipv4.gateway} dev eth0 - ip route add default via ${cfg.ipv4.gateway} dev eth0 + ip addr add ${cfg.ipv4.address}/${cfg.ipv4.cidr} dev enp6s0 + ip route add ${cfg.ipv4.gateway} dev enp6s0 + ip route add default via ${cfg.ipv4.gateway} dev enp6s0 - ip -6 addr add ${cfg.ipv6.address}/${cfg.ipv6.cidr} dev eth0 - ip -6 route add default via fe80::1 dev eth0 + ip -6 addr add ${cfg.ipv6.address}/${cfg.ipv6.cidr} dev enp6s0 + ip -6 route add default via fe80::1 dev enp6s0 ''; }; -- 2.45.1 From 6cf592bea3aaf2ff1e30f657f80565450ffa102a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 29 Nov 2023 14:11:17 +0100 Subject: [PATCH 2/3] wip --- .gitea/workflows/checks.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/checks.yaml b/.gitea/workflows/checks.yaml index a90c8e6..cfaedd6 100644 --- a/.gitea/workflows/checks.yaml +++ b/.gitea/workflows/checks.yaml @@ -7,5 +7,6 @@ jobs: test: runs-on: nix steps: + - run: sleep 99999 - uses: actions/checkout@v3 - run: nix run --refresh github:Mic92/nix-fast-build -- --no-nom -- 2.45.1 From 86c8d0fa2ec77b6a10d98afa0e8b547589461ed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 29 Nov 2023 14:20:36 +0100 Subject: [PATCH 3/3] podman: use host network --- .gitea/workflows/checks.yaml | 1 - modules/web01/gitea/actions-runner.nix | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitea/workflows/checks.yaml b/.gitea/workflows/checks.yaml index cfaedd6..a90c8e6 100644 --- a/.gitea/workflows/checks.yaml +++ b/.gitea/workflows/checks.yaml @@ -7,6 +7,5 @@ jobs: test: runs-on: nix steps: - - run: sleep 99999 - uses: actions/checkout@v3 - run: nix run --refresh github:Mic92/nix-fast-build -- --no-nom diff --git a/modules/web01/gitea/actions-runner.nix b/modules/web01/gitea/actions-runner.nix index 464bbba..f28f18c 100644 --- a/modules/web01/gitea/actions-runner.nix +++ b/modules/web01/gitea/actions-runner.nix @@ -205,7 +205,7 @@ lib.mkMerge [{ settings = { container.options = "-e NIX_BUILD_SHELL=/bin/bash -e PAGER=cat -e PATH=/bin -e SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt --device /dev/kvm -v /nix:/nix -v ${storeDeps}/bin:/bin -v ${storeDeps}/etc/ssl:/etc/ssl --user nixuser --device=/dev/kvm"; # the default network that also respects our dns server settings - container.network = "podman"; + container.network = "host"; container.valid_volumes = [ "/nix" "${storeDeps}/bin" -- 2.45.1