From 9d6200280e4bb7a53d4a2e8a4260c2f73d6dfa36 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Wed, 16 Apr 2025 19:30:09 -0400 Subject: [PATCH] Make driftwood autoupdate --- nixos/machines/driftwood/machine.nix | 1 + nixos/modules/autoupdate.nix | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 nixos/modules/autoupdate.nix diff --git a/nixos/machines/driftwood/machine.nix b/nixos/machines/driftwood/machine.nix index 4bf3d3d..5f8c1fe 100644 --- a/nixos/machines/driftwood/machine.nix +++ b/nixos/machines/driftwood/machine.nix @@ -31,6 +31,7 @@ imports = [ # Our modules (import ../../modules/base.nix {inherit inputs;}) + (import ../../modules/autoupdate.nix) (import ./configuration.nix) (import ./hardware.nix) (import ../../modules/user.nix { diff --git a/nixos/modules/autoupdate.nix b/nixos/modules/autoupdate.nix new file mode 100644 index 0000000..949b8e1 --- /dev/null +++ b/nixos/modules/autoupdate.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + pkgs, + ... +}: { + system.autoUpgrade = { + enable = true; + flake = "git+https://git.stranger.systems/Nix/System.git"; + dates = "02:00"; + randomizedDelaySec = "2h"; + }; +}