Hi all
Im running a system.activationScripts but I need to run this script just after a specific systemd service.
Any ideia in how to do it or if even its possible?
Hi all
Im running a system.activationScripts but I need to run this script just after a specific systemd service.
Any ideia in how to do it or if even its possible?
system.activationScripts is in stage2 https://github.com/NixOS/nixpkgs/blob/cf61d1df816834c86880b1c55df6122bc3a8f49a/nixos/modules/system/boot/stage-2-init.sh#L114
At the end of stage2, start systemd https://github.com/NixOS/nixpkgs/blob/cf61d1df816834c86880b1c55df6122bc3a8f49a/nixos/modules/system/boot/stage-2-init.sh#L143
I think what you need is systemd.services.<name>.postStart
I did not really understood, sorry.
I was looking fro something like
after = [ "set-hostname.service" ];
But this one does not work in the system.activationScripts
Can you tell me a emxempla in how to implement it?
@mlyxshi is saying that system.activationScripts runs before systemd even starts, so it fundamentally cannot be ordered after a systemd service. It’s not just a matter of the option not being present. It doesn’t even make sense.
Is there any reason you can’t use a systemd oneshot service for what you want to do here?