mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-30 20:56:39 +00:00
fix: API wasn't wanted by anyone
This commit is contained in:
parent
90effd391a
commit
1613dbfec2
|
@ -41,6 +41,7 @@ in
|
||||||
pkgs.gitMinimal
|
pkgs.gitMinimal
|
||||||
config.nix.package.out
|
config.nix.package.out
|
||||||
pkgs.restic
|
pkgs.restic
|
||||||
|
pkgs.rclone
|
||||||
pkgs.mkpasswd
|
pkgs.mkpasswd
|
||||||
pkgs.util-linux
|
pkgs.util-linux
|
||||||
pkgs.e2fsprogs
|
pkgs.e2fsprogs
|
||||||
|
@ -48,11 +49,13 @@ 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";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = "5";
|
RestartSec = "5";
|
||||||
|
Slice = "selfprivacy_api.slice";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.services.selfprivacy-api-worker = {
|
systemd.services.selfprivacy-api-worker = {
|
||||||
|
@ -73,6 +76,7 @@ in
|
||||||
pkgs.gitMinimal
|
pkgs.gitMinimal
|
||||||
config.nix.package.out
|
config.nix.package.out
|
||||||
pkgs.restic
|
pkgs.restic
|
||||||
|
pkgs.rclone
|
||||||
pkgs.mkpasswd
|
pkgs.mkpasswd
|
||||||
pkgs.util-linux
|
pkgs.util-linux
|
||||||
pkgs.e2fsprogs
|
pkgs.e2fsprogs
|
||||||
|
@ -80,13 +84,19 @@ 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";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = "5";
|
RestartSec = "5";
|
||||||
|
Slice = "selfprivacy_api.slice";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
systemd.slices."selfprivacy_api" = {
|
||||||
|
name = "selfprivacy_api.slice";
|
||||||
|
description = "Slice for SelfPrivacy API services";
|
||||||
|
};
|
||||||
# One shot systemd service to rebuild NixOS using nixos-rebuild
|
# One shot systemd service to rebuild NixOS using nixos-rebuild
|
||||||
systemd.services.sp-nixos-rebuild = {
|
systemd.services.sp-nixos-rebuild = {
|
||||||
description = "nixos-rebuild switch";
|
description = "nixos-rebuild switch";
|
||||||
|
|
Loading…
Reference in a new issue