From c0fb626fd262d64b7e1f55acdcf82a3e4f6330dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 27 Nov 2022 17:13:33 +0100 Subject: [PATCH] move kexec installer to subdirectory --- build-images.sh | 4 ++-- nix/{kexec-installer.nix => kexec-installer/module.nix} | 0 nix/{ => kexec-installer}/restore_routes.py | 2 +- nix/{kexec-installer-test.nix => kexec-installer/test.nix} | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename nix/{kexec-installer.nix => kexec-installer/module.nix} (100%) rename nix/{ => kexec-installer}/restore_routes.py (98%) rename nix/{kexec-installer-test.nix => kexec-installer/test.nix} (98%) diff --git a/build-images.sh b/build-images.sh index ed7f013..54e1c5f 100755 --- a/build-images.sh +++ b/build-images.sh @@ -29,8 +29,8 @@ build_kexec_bundle() { build_kexec_installer() { declare -r tag=$1 arch=$2 tmp=$3 # run the test once we have kvm support in github actions - # ignore=$(nix-build ./nix/kexec-installer-test.nix -I "nixpkgs=https://github.com/NixOS/nixpkgs/archive/${tag}.tar.gz" --argstr system "$arch") - out=$(nix-build '' -o "$tmp/kexec-installer-$arch" -I nixos-config=./nix/kexec-installer.nix -I "nixpkgs=https://github.com/NixOS/nixpkgs/archive/${tag}.tar.gz" --argstr system "$arch" -A config.system.build.kexecTarball) + # ignore=$(nix-build ./nix/kexec-installer/test.nix -I "nixpkgs=https://github.com/NixOS/nixpkgs/archive/${tag}.tar.gz" --argstr system "$arch") + out=$(nix-build '' -o "$tmp/kexec-installer-$arch" -I nixos-config=./nix/kexec-installer/module.nix -I "nixpkgs=https://github.com/NixOS/nixpkgs/archive/${tag}.tar.gz" --argstr system "$arch" -A config.system.build.kexecTarball) echo "$out/nixos-kexec-installer-$arch.tar.gz" } diff --git a/nix/kexec-installer.nix b/nix/kexec-installer/module.nix similarity index 100% rename from nix/kexec-installer.nix rename to nix/kexec-installer/module.nix diff --git a/nix/restore_routes.py b/nix/kexec-installer/restore_routes.py similarity index 98% rename from nix/restore_routes.py rename to nix/kexec-installer/restore_routes.py index e2d8ad7..9eb1f0a 100644 --- a/nix/restore_routes.py +++ b/nix/kexec-installer/restore_routes.py @@ -58,7 +58,7 @@ def generate_networkd_units( if route["dev"] != interface["ifname"]: continue - route_section = f"[Route]" + route_section = "[Route]" if route["dst"] != "default": # can be skipped for default routes route_section += f"Destination = {route['dst']}\n" diff --git a/nix/kexec-installer-test.nix b/nix/kexec-installer/test.nix similarity index 98% rename from nix/kexec-installer-test.nix rename to nix/kexec-installer/test.nix index 9b273cc..4e58747 100644 --- a/nix/kexec-installer-test.nix +++ b/nix/kexec-installer/test.nix @@ -29,7 +29,7 @@ in makeTest' { virtualisation.vlans = [ ]; environment.systemPackages = [ pkgs.hello ]; imports = [ - ./kexec-installer.nix + ./module.nix ]; }; };