From aeba0af8dd6ced7a2da7e778a28e3d7d627cada1 Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Mon, 9 Mar 2009 19:18:27 +0000 Subject: [PATCH] Allow specifying [] as filesystem option because you don't need any on vservers You still get a warning when not setting the value so that you can't forget it. svn path=/nixos/branches/fix-style/; revision=14477 --- boot/boot-stage-1.nix | 2 +- system/options.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/boot/boot-stage-1.nix b/boot/boot-stage-1.nix index 7b7f5503d0b7..46d4a52c6c92 100644 --- a/boot/boot-stage-1.nix +++ b/boot/boot-stage-1.nix @@ -148,7 +148,7 @@ rec { # !!! copy&pasted from upstart-jobs/filesystems.nix. mountPoints = - if fileSystems == [] + if fileSystems == null then abort "You must specify the fileSystems option!" else map (fs: fs.mountPoint) fileSystems; devices = map (fs: if fs ? device then fs.device else "/dev/disk/by-label/${fs.label}") fileSystems; diff --git a/system/options.nix b/system/options.nix index 53a3d11d7f66..68cad69d0d7f 100644 --- a/system/options.nix +++ b/system/options.nix @@ -303,7 +303,7 @@ in fileSystems = mkOption { - default = []; + default = null; example = [ { mountPoint = "/"; device = "/dev/hda1";