Skip to content

Instantly share code, notes, and snippets.

@malteneuss
Created July 8, 2023 21:36
Show Gist options
  • Save malteneuss/d01f9688c5d6d0059f35f30a72fc7321 to your computer and use it in GitHub Desktop.
Save malteneuss/d01f9688c5d6d0059f35f30a72fc7321 to your computer and use it in GitHub Desktop.
NixOS daily self-upgrading server config module for flake from different server
# Server module that checks itself daily for new config from Github flake
# source https://github.com/tfc/nixos-configs/blob/9dafd84c6de87835ca6966dae1c4c0603020c517/system-modules/auto-upgrade.nix
{ ... }:
{
system.autoUpgrade = {
enable = true;
flake = "github:tfc/nixos-configs";
flags = [ " --no-write-lock-file" ];
allowReboot = true;
dates = "02:00";
rebootWindow = {
lower = "02:00";
upper = "05:00";
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment