mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 08:53:56 -05:00
22 lines
464 B
Nix
22 lines
464 B
Nix
{
|
|
config,
|
|
lib,
|
|
reboot-bot,
|
|
}:
|
|
{
|
|
sops.secrets.reboot_token = { };
|
|
|
|
systemd.services.reboot_bot = {
|
|
enable = false;
|
|
wantedBy = [ "multi-user.target" ];
|
|
wants = [ "network-online.target" ];
|
|
after = [ "network-online.target" ];
|
|
|
|
serviceConfig = {
|
|
ExecStart = lib.getExe reboot-bot.packages.default;
|
|
EnvironmentFile = config.sops.secrets.reboot_token.path;
|
|
Restart = "on-failure";
|
|
RestartSec = "30s";
|
|
};
|
|
};
|
|
}
|