From 5a4f88ac866d351a8ce21cdcc12104238a0f6829 Mon Sep 17 00:00:00 2001 From: jaina heartles Date: Sun, 25 Feb 2024 13:05:20 -0800 Subject: [PATCH] unattended upgrades --- configuration.nix | 15 ++++++++++++++- flake.nix | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/configuration.nix b/configuration.nix index 83277d9..a2044de 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{ pkgs, ... }@inputs: { imports = [ ./hardware-configuration.nix ]; nix.settings = { @@ -12,6 +12,19 @@ options = "--delete-older-than 30d"; }; + system.autoUpgrade = { + enable = true; + flake = inputs.self.outPath; + flags = [ + "--update-input" + "nixpkgs" + "--no-write-lock-file" + "-L" # print build logs + ]; + dates = "02:00"; + randomizedDelaySec = "45min"; + }; + environment.systemPackages = with pkgs; [ kitty.terminfo kakoune diff --git a/flake.nix b/flake.nix index 0080983..afa9fdb 100644 --- a/flake.nix +++ b/flake.nix @@ -14,6 +14,7 @@ }; in import nixpkgs cfg; + specialArgs = attrs; modules = [ ./configuration.nix