unattended upgrades

This commit is contained in:
jaina heartles 2024-02-25 13:05:20 -08:00
parent 1b0e67744e
commit 5a4f88ac86
2 changed files with 15 additions and 1 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { { pkgs, ... }@inputs: {
imports = [ ./hardware-configuration.nix ]; imports = [ ./hardware-configuration.nix ];
nix.settings = { nix.settings = {
@ -12,6 +12,19 @@
options = "--delete-older-than 30d"; 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; [ environment.systemPackages = with pkgs; [
kitty.terminfo kitty.terminfo
kakoune kakoune

View file

@ -14,6 +14,7 @@
}; };
in import nixpkgs cfg; in import nixpkgs cfg;
specialArgs = attrs;
modules = [ modules = [
./configuration.nix ./configuration.nix