diff --git a/modules/module-list.nix b/modules/module-list.nix index 57f8a014a2ae..4bee34192660 100644 --- a/modules/module-list.nix +++ b/modules/module-list.nix @@ -1,5 +1,20 @@ [ #./hardware/network/intel-3945abg.nix ../etc/default.nix + ../system/assertion.nix + ../system/nixos-environment.nix + ../system/nixos-installer.nix + ../system/system-options.nix + ../upstart-jobs/cron/locate.nix + ../upstart-jobs/filesystems.nix + ../upstart-jobs/guest-users.nix + ../upstart-jobs/kbd.nix + ../upstart-jobs/ldap + ../upstart-jobs/lvm.nix + ../upstart-jobs/network-interfaces.nix + ../upstart-jobs/pcmcia.nix + ../upstart-jobs/swap.nix + ../upstart-jobs/swraid.nix + ../upstart-jobs/tty-backgrounds.nix ./config/fonts.nix ./config/i18n.nix ./config/system-path.nix @@ -69,20 +84,5 @@ ./system/upstart-events/ctrl-alt-delete.nix ./system/upstart-events/halt.nix ./system/upstart-events/maintenance-shell.nix - ../system/assertion.nix - ../system/nixos-environment.nix - ../system/nixos-installer.nix - ../system/system-options.nix - ../upstart-jobs/cron/locate.nix - ../upstart-jobs/default.nix - ../upstart-jobs/filesystems.nix - ../upstart-jobs/guest-users.nix - ../upstart-jobs/kbd.nix - ../upstart-jobs/ldap - ../upstart-jobs/lvm.nix - ../upstart-jobs/network-interfaces.nix - ../upstart-jobs/pcmcia.nix - ../upstart-jobs/swap.nix - ../upstart-jobs/swraid.nix - ../upstart-jobs/tty-backgrounds.nix + ./system/upstart/upstart.nix ] diff --git a/upstart-jobs/make-job.nix b/modules/system/upstart/make-job.nix similarity index 100% rename from upstart-jobs/make-job.nix rename to modules/system/upstart/make-job.nix diff --git a/upstart-jobs/lib/default.nix b/modules/system/upstart/tools.nix similarity index 100% rename from upstart-jobs/lib/default.nix rename to modules/system/upstart/tools.nix diff --git a/upstart-jobs/default.nix b/modules/system/upstart/upstart.nix similarity index 83% rename from upstart-jobs/default.nix rename to modules/system/upstart/upstart.nix index 006f9e062768..459b8a76e986 100644 --- a/upstart-jobs/default.nix +++ b/modules/system/upstart/upstart.nix @@ -60,7 +60,7 @@ let modprobe = config.system.sbin.modprobe; mount = config.system.sbin.mount; - makeJob = import ../upstart-jobs/make-job.nix { + makeJob = import ./make-job.nix { inherit (pkgs) runCommand; }; @@ -73,18 +73,29 @@ let # User-defined events. ++ (map makeJob (config.services.extraJobs)); - - command = import ../upstart-jobs/gather.nix { - inherit (pkgs) runCommand; - inherit jobs; - }; + + # Create an etc/event.d directory containing symlinks to the + # specified list of Upstart job files. + command = pkgs.runCommand "upstart-jobs" {inherit jobs;} + '' + ensureDir $out/etc/event.d + for i in $jobs; do + if ln -s $i . ; then + if test -d $i; then + ln -s $i/etc/event.d/* $out/etc/event.d/ + fi + else + echo Duplicate entry: $i; + fi; + done + ''; in { require = [ options - ./lib/default.nix + ./tools.nix # !!! doesn't seem to be used anywhere ]; environment = { diff --git a/upstart-jobs/gather.nix b/upstart-jobs/gather.nix deleted file mode 100644 index 726503f19174..000000000000 --- a/upstart-jobs/gather.nix +++ /dev/null @@ -1,17 +0,0 @@ -# Create an etc/event.d directory containing symlinks to the -# specified list of Upstart job files. -{runCommand, jobs}: - -runCommand "upstart-jobs" {inherit jobs;} - " - ensureDir $out/etc/event.d - for i in $jobs; do - if ln -s $i . ; then - if test -d $i; then - ln -s $i/etc/event.d/* $out/etc/event.d/ - fi - else - echo Duplicate entry: $i; - fi; - done - "