diff --git a/system/default.nix b/system/default.nix
index fb3733f..7a1415c 100644
--- a/system/default.nix
+++ b/system/default.nix
@@ -1,6 +1,7 @@
-{ config, pkgs, ... }:
+{ config, pkgs, lib, inputs, ... }:
 
-{
+let flakes = lib.filterAttrs (name: value: value ? outputs) inputs;
+in {
   imports = [
     ./hardened.nix
     ./sound.nix
@@ -35,4 +36,12 @@
 
   services.printing.enable = true;
   services.fwupd.enable = true;
+
+  system.autoUpgrade = {
+    enable = true;
+    dates = "02:00";
+    flake = "/etc/nixos";
+    flags = with lib;
+      flatten (mapAttrsToList (n: _: [ "--update-input" n ]) flakes);
+  };
 }
diff --git a/system/nix.nix b/system/nix.nix
index f4e646e..b59e61f 100644
--- a/system/nix.nix
+++ b/system/nix.nix
@@ -3,7 +3,7 @@
 {
   nix.gc = {
     automatic = true;
-    dates = "10:00";
+    dates = "04:00";
     options = "--delete-older-than 30d";
   };