Charlotte 🦝 Delenk
cfc8962db5
Some checks failed
Hydra nixosConfigurations.not522 Hydra build #26488 of nixos-config:pr618:nixosConfigurations.not522
Hydra packages.aarch64-linux.element-web Hydra build #26495 of nixos-config:pr618:packages.aarch64-linux.element-web
Hydra packages.aarch64-linux.element-desktop Hydra build #26494 of nixos-config:pr618:packages.aarch64-linux.element-desktop
Hydra packages.x86_64-linux.element-web Hydra build #26497 of nixos-config:pr618:packages.x86_64-linux.element-web
Hydra packages.x86_64-linux.element-desktop Hydra build #26496 of nixos-config:pr618:packages.x86_64-linux.element-desktop
Hydra nixosConfigurations.not522-installer Hydra build #26489 of nixos-config:pr618:nixosConfigurations.not522-installer
Hydra nixosConfigurations.oracle-installer Hydra build #26490 of nixos-config:pr618:nixosConfigurations.oracle-installer
Hydra nixosConfigurations.pc-installer Hydra build #26491 of nixos-config:pr618:nixosConfigurations.pc-installer
Hydra nixosConfigurations.thinkrac Hydra build #26493 of nixos-config:pr618:nixosConfigurations.thinkrac
Hydra nixosConfigurations.rainbow-resort Hydra build #26492 of nixos-config:pr618:nixosConfigurations.rainbow-resort
21 lines
488 B
Nix
21 lines
488 B
Nix
{ config, lib, ... }:
|
|
|
|
{
|
|
options = {
|
|
kexec.autoReboot = lib.mkOption {
|
|
default = true;
|
|
description = "auto-reboot at the end of the hour";
|
|
type = lib.types.bool;
|
|
};
|
|
};
|
|
config = lib.mkIf config.kexec.autoReboot {
|
|
systemd.timers.autoreboot = {
|
|
partOf = [ "autoreboot.service" ];
|
|
wantedBy = [ "timers.target" ];
|
|
timerConfig.OnCalendar = "hourly";
|
|
};
|
|
systemd.services.autoreboot = {
|
|
script = "shutdown -r +5";
|
|
};
|
|
};
|
|
}
|