summaryrefslogtreecommitdiffstats
path: root/default.nix
diff options
context:
space:
mode:
authorRobin Raymond <robin@robinraymond.de>2018-05-10 13:06:46 +0200
committerGitHub <noreply@github.com>2018-05-10 13:06:46 +0200
commit68232ddf873659ac4b13130349b32345210df024 (patch)
tree10ac2dd033f9e2e485691632e201e91aa35394eb /default.nix
parent6d3ab77a5dee9ad6c289bad4421e3c39e8275bcb (diff)
parent610a4008dcc6e3fb42be513c1d42dc269f6dc6e1 (diff)
Merge pull request #116 from phdoerfler/post-upgrade-check
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 60e73da..80d7708 100644
--- a/default.nix
+++ b/default.nix
@@ -642,6 +642,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";
@@ -716,5 +737,6 @@ in
./mail-server/rmilter.nix
./mail-server/nginx.nix
./mail-server/kresd.nix
+ ./mail-server/post-upgrade-check.nix
];
}