summaryrefslogtreecommitdiffstats
path: root/default.nix
diff options
context:
space:
mode:
authorPhilipp Dörfler <phdoerfler@gmail.com>2018-04-12 10:21:04 +0000
committerPhilipp Dörfler <phdoerfler@gmail.com>2018-04-12 10:31:49 +0000
commit610a4008dcc6e3fb42be513c1d42dc269f6dc6e1 (patch)
treed08c93ae1227c5c643630848f5ac7d47629b687e /default.nix
parent1dd394e63fa15d200faf83988f8fb5f9a54c04c5 (diff)
Added option for automatic reboot after a kernel upgrade.
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index 5ef87a3..92e2555 100644
--- a/default.nix
+++ b/default.nix
@@ -621,6 +621,27 @@ in
};
+ rebootAfterKernelUpgrade = {
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ example = true;
+ description = ''
+ Whether to enable automatic reboot after kernel upgrades.
+ This is to be used in conjunction with system.autoUpgrade.enable = true"
+ '';
+ };
+ method = mkOption {
+ type = types.enum [ "reboot" "systemctl kexec" ];
+ default = "reboot";
+ description = ''
+ Whether to issue a full "reboot" or just a "systemctl kexec"-only reboot.
+ It is recommended to use the default value because the quicker kexec reboot has a number of problems.
+ Also if your server is running in a virtual machine the regular reboot will already be very quick.
+ '';
+ };
+ };
+
backup = {
enable = mkEnableOption "backup via rsnapshot";
@@ -695,5 +716,6 @@ in
./mail-server/rmilter.nix
./mail-server/nginx.nix
./mail-server/kresd.nix
+ ./mail-server/post-upgrade-check.nix
];
}