From 85f7fc855a0b6516a67228ea870e10d3e7359aff Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Tue, 31 Dec 2024 10:49:00 -0800 Subject: [PATCH] Enable system auto updates --- dotfiles/nixos/desktop/sysconfig/nixos.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/dotfiles/nixos/desktop/sysconfig/nixos.nix b/dotfiles/nixos/desktop/sysconfig/nixos.nix index 84eec068..9e669c3b 100644 --- a/dotfiles/nixos/desktop/sysconfig/nixos.nix +++ b/dotfiles/nixos/desktop/sysconfig/nixos.nix @@ -1,5 +1,5 @@ -{ pkgs, lib, ... }: { - nixpkgs.config.allowUnfree = true; +{ pkgs, lib, inputs, ... }: { + nixpkgs.config.allowUnfree = true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; programs.nix-ld = { enable = true; @@ -7,4 +7,15 @@ }; nix.settings.experimental-features = [ "nix-command" "flakes" ]; home-manager.backupFileExtension = "backup"; -} \ No newline at end of file + system.autoUpgrade = { + enable = true; + flake = inputs.self.outPath; + flags = [ + "--update-input" + "nixpkgs" + "-L" + ]; + dates = "04:00"; + randomizedDelaySec = "30min"; + }; +}