From 3afe2d0562f86c42dd480f14e2c9003cf7292e81 Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Thu, 1 Dec 2022 17:55:51 +0100 Subject: [PATCH] Auto upgrade service --- flake.nix | 1 + nixos_modules/automatic-upgrade.nix | 8 ++++++++ odin/common_configuration.nix | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 nixos_modules/automatic-upgrade.nix diff --git a/flake.nix b/flake.nix index 0547457..0ad6d76 100644 --- a/flake.nix +++ b/flake.nix @@ -99,6 +99,7 @@ # Common modules ./nixos_modules/bertof_user.nix ./nixos_modules/automatic-garbage-collection.nix + ./nixos_modules/automatic-upgrade.nix ./nixos_modules/zerotier.nix ]; diff --git a/nixos_modules/automatic-upgrade.nix b/nixos_modules/automatic-upgrade.nix new file mode 100644 index 0000000..e084c8e --- /dev/null +++ b/nixos_modules/automatic-upgrade.nix @@ -0,0 +1,8 @@ +{ + system.autoUpgrade = { + enable = true; + flake = "gitlab:bertof/nix-dotfiles"; + # dates = "daily"; # default 04:04 + randomizedDelaySec = "45min"; + }; +} diff --git a/odin/common_configuration.nix b/odin/common_configuration.nix index 484e6b2..8ae1eae 100644 --- a/odin/common_configuration.nix +++ b/odin/common_configuration.nix @@ -294,5 +294,5 @@ with lib; { # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "21.11"; # Did you read the comment? + system.stateVersion = "22.11"; # Did you read the comment? }