git.delta.rocks / fleet / refs/commits / ef13d91cc677

difftreelog

feat online-activation.target

opzvvwvrYaroslav Bolyukin2026-04-22parent: #16f8cd1.patch.diff

1 file changed

modifiedmodules/nixos/online.nixdiffbeforeafterboth
71 ) set;71 ) set;
72 };72 };
7373
74 config.system.activationScripts = {74 config = {
75 systemd.targets.online-activation = {
76 description = "Online activation target for deploy-time services";
77 };
78
79 system.activationScripts = {
75 onlineActivation = {80 onlineActivation = {
76 text = ''81 text = ''
77 if [ ! -z ''${FLEET_ONLINE_ACTIVATION+x} ]; then82 if [ ! -z ''${FLEET_ONLINE_ACTIVATION+x} ]; then
78 1>&2 echo "online activation; hello, fleet!"83 1>&2 echo "online activation; hello, fleet!"
79 fi84 systemctl start online-activation.target
85 fi
80 '';86 '';
81 supportsDryActivation = true;87 supportsDryActivation = true;
82 };88 };
83 }89 }
84 // config.system.onlineActivationScripts;90 // config.system.onlineActivationScripts;
8591
86 config.systemd.services = mkIf config.networking.networkmanager.enable {92 systemd.services = mkIf config.networking.networkmanager.enable {
87 # If machine is managed by fleet, we should not restart NetworkManager during activation,93 # If machine is managed by fleet, we should not restart NetworkManager during activation,
88 # as it will disrupt the activation process. Furthermore, NetworkManager is not declarative,94 # as it will disrupt the activation process. Furthermore, NetworkManager is not declarative,
89 # so even if user wants to update his network settings - disabled NetworkManager restart95 # so even if user wants to update his network settings - disabled NetworkManager restart
90 # will not affect that.96 # will not affect that.
91 NetworkManager.restartIfChanged = mkDefault false;97 NetworkManager.restartIfChanged = mkDefault false;
92 };98 };
99 };
93}100}
94101