1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 06:31:02 +00:00

fixing assertions using new assertion implementation

svn path=/nixos/branches/modular-nixos/; revision=15409
This commit is contained in:
Marc Weber 2009-04-30 02:29:58 +00:00
parent d804730382
commit 3636fa1a04
5 changed files with 16 additions and 19 deletions

View file

@ -409,7 +409,7 @@ in
(import ../upstart-jobs/nscd.nix) # Name service cache daemon.
(import ../upstart-jobs/maintenance-shell.nix) # Handles the maintenance/stalled event (single-user shell).
(import ../upstart-jobs/ctrl-alt-delete.nix) # Ctrl-alt-delete action.
(import ../upstart-jobs/halt.nix) # FIXME (assertion) # Handles the reboot/halt events.
(import ../upstart-jobs/halt.nix)
(import ../upstart-jobs/ifplugd.nix) # ifplugd daemon for monitoring Ethernet cables.
@ -475,16 +475,16 @@ in
(import ../upstart-jobs/udev.nix) # The udev daemon creates devices nodes and runs programs when hardware events occur.
(import ../upstart-jobs/samba.nix) # TODO: doesn't start here (?)
(import ../upstart-jobs/ircd-hybrid.nix) # TODO: doesn't compile on x86_64-linux, can't test
(import ../upstart-jobs/xfs.nix) # FIXME (assertion)
(import ../upstart-jobs/xfs.nix)
(import ../upstart-jobs/mysql.nix)
(import ../upstart-jobs/postgresql.nix)
(import ../upstart-jobs/openfire.nix) # FIXME (assertion)
(import ../upstart-jobs/openfire.nix)
(import ../upstart-jobs/postfix.nix)
(import ../upstart-jobs/dovecot.nix)
(import ../upstart-jobs/bind.nix)
(import ../upstart-jobs/mingetty.nix) # The terminals on ttyX.
(import ../upstart-jobs/tty-backgrounds.nix) #FIXME (assertion)
(import ../upstart-jobs/tty-backgrounds.nix)
(import ../upstart-jobs/synergy.nix)

View file

@ -3,13 +3,6 @@
###### implementation
/* FIXME
assert event == "reboot"
|| event == "halt"
|| event == "system-halt"
|| event == "power-off";
*/
let
inherit (pkgs) bash utillinux;

View file

@ -26,8 +26,6 @@ in
###### implementation
# FIXME (see xfs)
# if (!(config.services.openfire.usePostgreSQL -> config.services.postgresql.enable)) then throw "openfire assertion failed" else
let
inherit (pkgs) jre openfire coreutils which gnugrep gawk gnused;
@ -41,6 +39,12 @@ let
in
mkIf config.services.openfire.enable {
assertions = [ {
assertion = !(config.services.openfire.usePostgreSQL -> config.services.postgresql.enable);
message = "openfire assertion failed";
} ];
require = [
options
];

View file

@ -112,10 +112,10 @@ let
in
# FIXME see xfs
# assert splashutils != null;
mkIf (config.services.ttyBackgrounds.enable) {
assertions = [ { assertion = kernelPackages.splashutils != null; message = "kernelPackages.splashutils may not be false"; } ];
mkIf (config.services.ttyBackgrounds.enable && kernelPackages.splashutils != null) {
require = [
options
];

View file

@ -23,15 +23,15 @@ in
###### implementation
# FIXME: enable this warning again. It's causing "infinite recursion encountered, why?"
# if ! config.fonts.enableFontDir then throw "Please enable fontDir (fonts.enableFontDir) to use xfs." else
let
configFile = ./xfs.conf;
startingDependency = if config.services.gw6c.enable && config.services.gw6c.autorun then "gw6c" else "network-interfaces";
in
mkIf config.services.xfs.enable {
assertions = [ { assertion = ! config.fonts.enableFontDir; message = "Please enable fontDir (fonts.enableFontDir) to use xfs."; } ];
require = [
options
];