From 46cd291c605f0f541c992b9744184904be7803b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 3 Sep 2024 09:28:12 +0200 Subject: [PATCH] avoid toplevel python script in nix-store this will trigger a os.listdir() on the nix-store --- nix/kexec-installer/module.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/kexec-installer/module.nix b/nix/kexec-installer/module.nix index a10e6a5..4bd1511 100644 --- a/nix/kexec-installer/module.nix +++ b/nix/kexec-installer/module.nix @@ -1,6 +1,6 @@ { config, lib, modulesPath, pkgs, ... }: let - restore-network = pkgs.writers.writePython3 "restore-network" { flakeIgnore = [ "E501" ]; } + restore-network = pkgs.writers.writePython3Bin "restore-network" { flakeIgnore = [ "E501" ]; } ./restore_routes.py; # does not link with iptables enabled @@ -64,7 +64,7 @@ in Type = "oneshot"; RemainAfterExit = true; ExecStart = [ - "${restore-network} /root/network/addrs.json /root/network/routes-v4.json /root/network/routes-v6.json /etc/systemd/network" + "${restore-network}/bin/restore-network /root/network/addrs.json /root/network/routes-v4.json /root/network/routes-v6.json /etc/systemd/network" ]; };