fix: SelfPrivacy API didn't load on system startup

This commit is contained in:
Inex Code 2024-12-08 16:39:30 +03:00
parent bc45ced6ad
commit 25b6b9ca77
No known key found for this signature in database

View file

@ -49,6 +49,7 @@ in
]; ];
after = [ "network-online.target" ]; after = [ "network-online.target" ];
wants = [ "network-online.target" ]; wants = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = { serviceConfig = {
User = "root"; User = "root";
ExecStart = "${selfprivacy-graphql-api}/bin/app.py"; ExecStart = "${selfprivacy-graphql-api}/bin/app.py";
@ -83,6 +84,7 @@ in
]; ];
after = [ "network-online.target" ]; after = [ "network-online.target" ];
wants = [ "network-online.target" ]; wants = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = { serviceConfig = {
User = "root"; User = "root";
ExecStart = "${pkgs.python312Packages.huey}/bin/huey_consumer.py selfprivacy_api.task_registry.huey"; ExecStart = "${pkgs.python312Packages.huey}/bin/huey_consumer.py selfprivacy_api.task_registry.huey";
@ -115,7 +117,7 @@ in
ExecStart = '' ExecStart = ''
${nixos-rebuild} switch --flake .#${config-id} ${nixos-rebuild} switch --flake .#${config-id}
''; '';
KillMode = "none"; KillMode = "mixed";
SendSIGKILL = "no"; SendSIGKILL = "no";
}; };
restartIfChanged = false; restartIfChanged = false;
@ -142,7 +144,7 @@ in
ExecStart = '' ExecStart = ''
${nixos-rebuild} switch --flake .#${config-id} ${nixos-rebuild} switch --flake .#${config-id}
''; '';
KillMode = "none"; KillMode = "mixed";
SendSIGKILL = "no"; SendSIGKILL = "no";
}; };
restartIfChanged = false; restartIfChanged = false;
@ -164,7 +166,7 @@ in
ExecStart = '' ExecStart = ''
${nixos-rebuild} switch --rollback --flake .#${config-id} ${nixos-rebuild} switch --rollback --flake .#${config-id}
''; '';
KillMode = "none"; KillMode = "mixed";
SendSIGKILL = "no"; SendSIGKILL = "no";
}; };
restartIfChanged = false; restartIfChanged = false;