mirror of
https://github.com/oqyude/nixos.git
synced 2026-06-10 20:20:41 +03:00
27 lines
550 B
Nix
27 lines
550 B
Nix
{
|
|
config,
|
|
xlib,
|
|
...
|
|
}:
|
|
{
|
|
systemd = {
|
|
services.nixos-auto-rebuild = {
|
|
description = "Auto rebuild NixOS config";
|
|
serviceConfig = {
|
|
Type = "oneshot";
|
|
User = "${xlib.device.username}";
|
|
WorkingDirectory = "/etc/nixos";
|
|
ExecStart = "gp-ns";
|
|
};
|
|
};
|
|
timers.nixos-auto-rebuild = {
|
|
description = "Run NixOS auto rebuild at 4am daily";
|
|
wantedBy = [ "timers.target" ];
|
|
timerConfig = {
|
|
OnCalendar = "*-*-* 04:00:00";
|
|
Persistent = true;
|
|
};
|
|
};
|
|
};
|
|
}
|