From fbf53168f3dc640d63a67f8f7d46d86439979193 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Mon, 11 Jun 2012 07:05:11 +0000 Subject: [PATCH] Add new option config.boot.cleanTmpDir. This option is to control if the user wants to have its /tmp directory cleaned up during system boot. svn path=/nixos/trunk/; revision=34432 --- modules/system/boot/stage-2.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/system/boot/stage-2.nix b/modules/system/boot/stage-2.nix index c92c29d6aefd..d1a4e81ce2ca 100644 --- a/modules/system/boot/stage-2.nix +++ b/modules/system/boot/stage-2.nix @@ -40,6 +40,14 @@ let for the accepted syntax. ''; }; + + cleanTmpDir = pkgs.lib.mkOption { + default = false; + example = true; + description = '' + Delete all files in /tmp/ during boot. + ''; + }; }; }; @@ -51,7 +59,7 @@ let src = ./stage-2-init.sh; shellDebug = "${pkgs.bashInteractive}/bin/bash"; isExecutable = true; - inherit (config.boot) devShmSize runSize; + inherit (config.boot) devShmSize runSize cleanTmpDir; ttyGid = config.ids.gids.tty; upstart = config.system.build.upstart; path =