diff --git a/nix/kexec-installer/module.nix b/nix/kexec-installer/module.nix index 6ee3523..09a76cf 100644 --- a/nix/kexec-installer/module.nix +++ b/nix/kexec-installer/module.nix @@ -1,6 +1,6 @@ { config, lib, modulesPath, pkgs, ... }: let - restoreNetwork = pkgs.writers.writePython3 "restore-network" { + restore-network = pkgs.writers.writePython3 "restore-network" { flakeIgnore = ["E501"]; } ./restore_routes.py; @@ -106,7 +106,7 @@ in { pkgs.jq ]; - systemd.services.restoreNetwork = { + systemd.services.restore-network = { before = [ "network-pre.target" ]; wants = [ "network-pre.target" ]; wantedBy = [ "multi-user.target" ]; @@ -115,7 +115,7 @@ in { Type = "oneshot"; RemainAfterExit = true; ExecStart = [ - "${restoreNetwork} /root/network/addrs.json /root/network/routes-v4.json /root/network/routes-v6.json /etc/systemd/network" + "${restore-network} /root/network/addrs.json /root/network/routes-v4.json /root/network/routes-v6.json /etc/systemd/network" ]; }; diff --git a/nix/kexec-installer/test.nix b/nix/kexec-installer/test.nix index 984a44b..ddadfeb 100644 --- a/nix/kexec-installer/test.nix +++ b/nix/kexec-installer/test.nix @@ -156,7 +156,7 @@ in makeTest' { assert root_ed25519_before == root_ed25519_after, f"{root_ed25519_before} != {root_ed25519_after}" # See if we can reach the router after kexec - node1.wait_for_unit("restoreNetwork.service") + node1.wait_for_unit("restore-network.service") node1.wait_until_succeeds("cat /etc/systemd/network/eth1.network >&2") node1.wait_until_succeeds("ping -c1 10.0.0.1") node1.wait_until_succeeds("ping -c1 2001:db8::1")