Commit graph

1350 commits

Author SHA1 Message Date
Eelco Dolstra 3b931f7861 * We still need /etc/pam.d/other to keep usermod happy.
svn path=/nixos/trunk/; revision=16731
2009-08-16 15:46:24 +00:00
Eelco Dolstra 2884c9a836 * Style change.
svn path=/nixos/trunk/; revision=16730
2009-08-16 14:54:31 +00:00
Eelco Dolstra 39bffdb34c * Make the generation of /etc/pam.d more declarative. There now is an
option security.pam.services containing the list of PAM services.
  For instance, the SLiM module simply declares:

    security.pam.services = [ { name = "slim"; localLogin = true; } ];

svn path=/nixos/trunk/; revision=16729
2009-08-16 14:49:14 +00:00
Eelco Dolstra 88c505c9e0 * make-etc.sh: fixed the duplicate entry check.
* Inlined make-etc.nix since it's a trivial function.

svn path=/nixos/trunk/; revision=16728
2009-08-16 13:14:33 +00:00
Eelco Dolstra 9493ecc2a4 * Use the hal-info package.
svn path=/nixos/trunk/; revision=16693
2009-08-11 21:16:59 +00:00
Eelco Dolstra dc093b57dd * Updates to the udev service: support persistant CD-ROM / network
interface names, use udev's own firmware loader, and dropped the
  sndMode option (udev puts all audio devices in the "audio" group, so
  users can be added to that group if necessary).

svn path=/nixos/trunk/; revision=16692
2009-08-11 21:16:15 +00:00
Eelco Dolstra 25dbf1594e * Updates for the new udev and util-linux-ng: fsck is now in
util-linux-ng instead of e2fsprogs, blkid is in util-linux-ng, and
  we need to manually create /dev/.udev prior to starting udevd for
  some reason.

svn path=/nixos/trunk/; revision=16691
2009-08-11 21:12:37 +00:00
Eelco Dolstra 39d1b11ff7 * The mount hack is gone, just use the regular mount from
util-linux-ng and make sure that the needed mount helpers
  (e.g. ntfs3g) are in /var/lib/current-system/sw/sbin.

svn path=/nixos/trunk/; revision=16690
2009-08-11 21:10:33 +00:00
Eelco Dolstra fd56f110da * Clean up some boot messages.
svn path=/nixos/trunk/; revision=16689
2009-08-11 21:09:25 +00:00
Eelco Dolstra bed6fd6a61 * `umount -f' causes lots of problems, so don't do it.
svn path=/nixos/trunk/; revision=16688
2009-08-11 21:08:05 +00:00
Eelco Dolstra bd2fbcf9e5 * Fix the bluetoothd stop condition.
svn path=/nixos/trunk/; revision=16687
2009-08-11 21:06:17 +00:00
Eelco Dolstra fe329f96ef * Mount the host's /nix/var/nix/db in the guest.
svn path=/nixos/trunk/; revision=16674
2009-08-11 14:28:25 +00:00
Sander van der Burg e8103aa39d Implemented support for per application configuration files
svn path=/nixos/trunk/; revision=16668
2009-08-11 09:40:31 +00:00
Eelco Dolstra c21b02d34b * Add some groups required by the latest udev.
svn path=/nixos/trunk/; revision=16667
2009-08-11 09:17:30 +00:00
Eelco Dolstra f666aa7479 * With "nixos-rebuild build-vm", override the video driver of
the host (since e.g. "nvidia" won't work in the VM).

svn path=/nixos/trunk/; revision=16663
2009-08-11 02:02:01 +00:00
Eelco Dolstra 89ef5c979b * New nixos-rebuild action: "nixos-rebuild build-vm" builds a virtual
machine containing a replica (minus the state) of the system
  configuration.  This is mostly useful for testing configuration
  changes prior to doing an actual "nixos-rebuild switch" (or even
  "nixos-rebuild test").  The VM can be started as follows:

  $ nixos-rebuild build-vm
  $ ./result/bin/run-*-vm

  which starts a KVM/QEMU instance.  Additional QEMU options can be
  passed through the QEMU_OPTS environment variable
  (e.g. QEMU_OPTS="-redir tcp:8080::80" to forward a host port to the
  guest).  The fileSystem attribute of the regular system
  configuration is ignored (using mkOverride), because obviously we
  can't allow the VM to access the host's block devices.  Instead, at
  startup the VM creates an empty disk image in ./<hostname>.qcow2 to
  store the VM's root filesystem.

  Building a VM in this way is efficient because the VM shares its Nix
  store with the host (through a CIFS mount).  However, because the
  Nix store of the host is mounted read-only in the guest, you cannot
  run Nix build actions inside the VM.  Therefore the VM can only be
  reconfigured by re-running "nixos-rebuild build-vm" on the host and
  restarting the VM.

svn path=/nixos/trunk/; revision=16662
2009-08-11 01:35:56 +00:00
Sander van der Burg ebd2fbd24f Removed mod_jk option, which is obsolete
svn path=/nixos/trunk/; revision=16660
2009-08-10 20:16:33 +00:00
Eelco Dolstra f003f6d7cd * Fixed the path to the services tree. This should be a NixOS module argument.
svn path=/nixos/trunk/; revision=16658
2009-08-10 20:07:58 +00:00
Eelco Dolstra 167ccdd537 * Move the firmware loader into a separate module.
* services.udev.addFirmware -> hardware.firmware.

svn path=/nixos/trunk/; revision=16657
2009-08-10 19:27:15 +00:00
Eelco Dolstra b3c0061a91 * services.udev.addUdevPkgs -> services.udev.packages.
* Simplified the udev rules generation: merged nixRules into
  services.udev.extraRules, and handle services.udev.extraRules using
  services.udev.packages.

svn path=/nixos/trunk/; revision=16655
2009-08-10 19:05:20 +00:00
Sander van der Burg 0d35699507 Implemented virtual host support. Now it's possible to assign web applications to virtual host, for example:
{
  ...

  services = {
    tomcat = {
      enable = true;
      virtualHosts = [
        { name = "test1.localhost";
          webapps = [ mypkgs.HelloApp ];
        }
        { name = "test2.localhost";
          webapps = [ mypkgs.ByeApp ];
        }
      ];
    };
  };
}


svn path=/nixos/trunk/; revision=16654
2009-08-10 18:45:18 +00:00
Eelco Dolstra b4f8f919ab * Clean up the udev module.
svn path=/nixos/trunk/; revision=16653
2009-08-10 18:41:57 +00:00
Eelco Dolstra 2331a5140d * Added a module for the bluetooth daemon.
* Refactored some other modules (dbus, hal).

svn path=/nixos/trunk/; revision=16652
2009-08-10 18:25:09 +00:00
Eelco Dolstra 0ab6be1c81 * Restarting dbus no longer seems to kill the X server.
svn path=/nixos/trunk/; revision=16650
2009-08-10 16:18:51 +00:00
Sander van der Burg 89810914e4 Added virtual host support, which requires some more testing
svn path=/nixos/trunk/; revision=16649
2009-08-10 15:27:25 +00:00
Ludovic Courtès fe51b0c6c3 bashrc: Source `${bash}/etc/bash_completion' when available.
svn path=/nixos/trunk/; revision=16641
2009-08-10 10:18:33 +00:00
Ludovic Courtès 4c848efc1a bashrc: Remove obsolete aclocal' and rpcgen' hacks.
svn path=/nixos/trunk/; revision=16640
2009-08-10 10:07:30 +00:00
Ludovic Courtès ac29ad197b stage-1-init: Remove timeout from `fail()'.
Timeouts upon failure can be harmful, e.g., after a file system failure
that needs manual intervention.

svn path=/nixos/trunk/; revision=16637
2009-08-10 09:20:05 +00:00
Sander van der Burg 8c034b988d Added a lot of modifications in order to expression a Tomcat configuration better and to perform more efficient management of various Tomcat components.
With these modifications, a user can configure a tomcat instance with web applications and web services by writing a service, such as:

...

services = {
  tomcat = {
    enable = true;
    webapps = [ mypkgs.HelloWorldWebApplication ];
    axis2 = {
      enable = true;
      services = [ mypkgs.HelloService mypkgs.HelloWorldService ];
    };
  };
};


svn path=/nixos/trunk/; revision=16619
2009-08-09 20:19:07 +00:00
Eelco Dolstra 02c119a104 * Workaround for hangs on x86_64.
svn path=/nixos/branches/modular-nixos/; revision=16590
2009-08-05 11:43:51 +00:00
Eelco Dolstra 7d3e2b15ef svn path=/nixos/branches/modular-nixos/; revision=16585 2009-08-04 16:09:07 +00:00
Eelco Dolstra 32bb5b2d0f * Bring back the options to enable/disable the Intel firmwares.
svn path=/nixos/branches/modular-nixos/; revision=16574
2009-08-04 08:50:02 +00:00
Michael Raskin c8705704e1 Add Wacom X11 driver support
svn path=/nixos/branches/modular-nixos/; revision=16569
2009-08-03 19:55:33 +00:00
Eelco Dolstra 383370f782 * Don't create a temporary file in $HOME.
svn path=/nixos/branches/modular-nixos/; revision=16561
2009-08-03 12:44:45 +00:00
Eelco Dolstra 6802a75076 * nixos-rebuild: replaced some environment variables with options
(e.g. --install-grub instead of $NIXOS_INSTALL_GRUB).  Also support
  some nix-build options (e.g. --show-trace and -j).

svn path=/nixos/branches/modular-nixos/; revision=16560
2009-08-03 12:36:15 +00:00
Eelco Dolstra bc54061cba svn path=/nixos/branches/modular-nixos/; revision=16557 2009-08-03 12:17:23 +00:00
Michael Raskin 137ce0907c Some fixes in on-boot activation
svn path=/nixos/branches/modular-nixos/; revision=16525
2009-07-31 08:32:53 +00:00
Michael Raskin f05682c84d Give some progress indications during Stage2 boot
svn path=/nixos/branches/modular-nixos/; revision=16523
2009-07-31 04:56:52 +00:00
Michael Raskin bef1dc8bd5 Update RC kernel for rescue CD: includes some BtrFS fixes
svn path=/nixos/branches/modular-nixos/; revision=16515
2009-07-30 04:20:56 +00:00
Michael Raskin 6aba79bed5 Update child configuration generation
svn path=/nixos/branches/modular-nixos/; revision=16514
2009-07-30 04:20:23 +00:00
Rob Vermaas 9c05dd98dc intel5000 firmware
svn path=/nixos/branches/modular-nixos/; revision=16473
2009-07-27 14:08:14 +00:00
Eelco Dolstra f0f5434eaa * Add an option to enable the firewall. It should eventually be
enabled by default.

svn path=/nixos/branches/modular-nixos/; revision=16464
2009-07-26 21:27:35 +00:00
Eelco Dolstra 264b49fce7 * A very basic firewall that rejects all incoming connections except
for the ports defined in networking.firewall.allowedTCPPorts.

svn path=/nixos/branches/modular-nixos/; revision=16460
2009-07-24 23:12:52 +00:00
Eelco Dolstra 38d594deec * wpa_supplicant: start/stop automatically.
svn path=/nixos/branches/modular-nixos/; revision=16451
2009-07-24 00:31:42 +00:00
Eelco Dolstra c4780a8953 * dhcp 4.1 requires IPv6 support.
svn path=/nixos/branches/modular-nixos/; revision=16450
2009-07-24 00:31:22 +00:00
Eelco Dolstra 32b311a0f5 * Add gzip to the $PATH of nix-daemon, otherwise distributed builds
don't work.  This is a regression wrt the trunk.

svn path=/nixos/branches/modular-nixos/; revision=16448
2009-07-23 23:25:50 +00:00
Marc Weber dbd6ea7f63 adding daemonNiceLevel option. running biulds with niceness 0 can be annoying
svn path=/nixos/branches/modular-nixos/; revision=16420
2009-07-18 16:14:03 +00:00
Eelco Dolstra d591559609 * A simple module for running wpa_supplicant.
svn path=/nixos/branches/modular-nixos/; revision=16409
2009-07-16 21:08:32 +00:00
Eelco Dolstra 3abf509637 * Don't try to start dhclient on the wmaster0 interface. This just
gets rid of endless dhclient log messages such as

    Jul 16 19:09:30 dutibo dhclient: DHCPDISCOVER on wmaster0 to 255.255.255.255 port 67 interval 19
    Jul 16 19:09:30 dutibo dhclient: send_packet: Network is down

svn path=/nixos/branches/modular-nixos/; revision=16407
2009-07-16 17:25:50 +00:00
Eelco Dolstra b58682401e * Give a type to networking.interfaces.
* Simplified the pre-start script of the network-interfaces module.
* Removed wireless support from the network-interfaces module.  It
  only worked for static WEP configurations anyway, and AFAIK nobody
  used it.

svn path=/nixos/branches/modular-nixos/; revision=16406
2009-07-16 17:18:54 +00:00
Eelco Dolstra f53c9d70ec * The lack of a newline at the end of "EnableSendFile Off" caused a
broken httpd.conf to be generated.  We should really have a merge
  function that appends newlines to every value of options like
  services.httpd.extraConfig.

svn path=/nixos/branches/modular-nixos/; revision=16404
2009-07-16 16:13:35 +00:00
Eelco Dolstra 2cd3e205f4 svn path=/nixos/branches/modular-nixos/; revision=16397 2009-07-16 15:01:56 +00:00
Eelco Dolstra 6119c399d8 * Support tasks in the new Upstart formalism.
* Swap task: fixed removing disabled swap devices.
* Swap task: specified the type of swapDevices.

svn path=/nixos/branches/modular-nixos/; revision=16396
2009-07-16 14:51:49 +00:00
Eelco Dolstra 7cb4503ad6 * More Upstart refactoring.
svn path=/nixos/branches/modular-nixos/; revision=16394
2009-07-16 13:55:11 +00:00
Eelco Dolstra bb292fdf04 * Support post-stop actions.
svn path=/nixos/branches/modular-nixos/; revision=16393
2009-07-16 13:46:49 +00:00
Michael Raskin 8f7b33c87d I thought squashfs would not require loop.ko
svn path=/nixos/branches/modular-nixos/; revision=16388
2009-07-16 10:28:58 +00:00
Michael Raskin fac9d09941 Oops, forgot FS modules
svn path=/nixos/branches/modular-nixos/; revision=16387
2009-07-16 10:06:53 +00:00
Michael Raskin e155a46516 Forgot all-module fixes for the correct booting in rescue CD
svn path=/nixos/branches/modular-nixos/; revision=16386
2009-07-16 09:48:22 +00:00
Michael Raskin a7f24fd4bb Trying to build a good rescue CD..
svn path=/nixos/branches/modular-nixos/; revision=16385
2009-07-16 09:22:40 +00:00
Eelco Dolstra 889311f4ca * Refactored the sshd module.
svn path=/nixos/branches/modular-nixos/; revision=16377
2009-07-15 15:53:39 +00:00
Eelco Dolstra c45cf3a28e * In the jobs attribute, support a more high-level way of specifying
jobs, e.g. (from the nscd job)

    { name = "nscd";

      description = "Name Service Cache Daemon";

      startOn = "startup";
      stopOn = "shutdown";

      environment = { LD_LIBRARY_PATH = nssModulesPath; };
        
      preStart =
        ''
          mkdir -m 0755 -p /var/run/nscd
          mkdir -m 0755 -p /var/db/nscd
        '';

      exec = "${pkgs.glibc}/sbin/nscd -f ${./nscd.conf} -d 2> /dev/null";
    };

  The Upstart job is generated from this.  The main goal is to provide
  some abstraction from the Upstart syntax.  For instance, this should
  make it easier to upgrade to newer versions of Upstart, to switch to
  an entirely different process management system (e.g. initng or
  launchd), or to test a job independantly from Upstart.  (However the
  startOn and stopOn attributes are tied to Upstart's event model.)

svn path=/nixos/branches/modular-nixos/; revision=16376
2009-07-15 15:24:11 +00:00
Eelco Dolstra 0e3bef4195 * Declare the type of jobs.
svn path=/nixos/branches/modular-nixos/; revision=16375
2009-07-15 13:41:00 +00:00
Eelco Dolstra 1424399002 * Simplify.
svn path=/nixos/branches/modular-nixos/; revision=16373
2009-07-15 12:52:32 +00:00
Eelco Dolstra 96fe3ba1b7 * Inline make-job.nix.
svn path=/nixos/branches/modular-nixos/; revision=16372
2009-07-15 11:38:17 +00:00
Eelco Dolstra 9d1e31117f * Get rid of the "users" and "groups" fields in jobs.
svn path=/nixos/branches/modular-nixos/; revision=16371
2009-07-15 11:34:55 +00:00
Eelco Dolstra ca8e00cafa * Got rid of the extraPath field in jobs (use
environment.systemPackages instead).  Also renamed
  services.extraJobs to jobs.

svn path=/nixos/branches/modular-nixos/; revision=16370
2009-07-15 11:19:11 +00:00
Eelco Dolstra def0be732f * job.extraHttpdConfig: not used anywhere.
svn path=/nixos/branches/modular-nixos/; revision=16369
2009-07-15 09:14:24 +00:00
Eelco Dolstra 118418ba31 * Refactoring the Upstart module. Got rid of job.extraEtc, it's
redundant now (modules can just define environment.etc).

svn path=/nixos/branches/modular-nixos/; revision=16367
2009-07-15 09:06:36 +00:00
Eelco Dolstra b66fd2364c * Don't put /etc/nixos/nixos in ~/.nix-defexpr.
svn path=/nixos/branches/modular-nixos/; revision=16366
2009-07-15 08:45:29 +00:00
Eelco Dolstra da996583ee * Include the NixOS manpages in the system environment. Actually
there is only one currently: configuration.nix(5), which contains a
  list of all the options.

svn path=/nixos/branches/modular-nixos/; revision=16360
2009-07-14 16:27:46 +00:00
Eelco Dolstra ab1676b457 * Urgh, this should have been in commit r16350.
svn path=/nixos/branches/modular-nixos/; revision=16353
2009-07-14 13:28:50 +00:00
Eelco Dolstra b84bab7873 * Use the relatime mount option by default. (This is the default
anyway in Linux 2.6.30.)

svn path=/nixos/branches/modular-nixos/; revision=16348
2009-07-14 12:07:17 +00:00
Lluís Batlle i Rossell c331fd106b Updated the xserver video drivers list, removing the old via, and putting the new openchrome.
svn path=/nixos/branches/modular-nixos/; revision=16330
2009-07-11 10:33:42 +00:00
Marc Weber d4a37c2f1b fix copy paste error
svn path=/nixos/branches/modular-nixos/; revision=16278
2009-07-09 14:35:03 +00:00
Ludovic Courtès 6d2cc812c2 Make the Liberation Fonts available by default.
svn path=/nixos/branches/modular-nixos/; revision=16274
2009-07-09 12:10:58 +00:00
Ludovic Courtès fa9f557b96 Add `localhost' under its "real" host name to /etc/hosts.
svn path=/nixos/branches/modular-nixos/; revision=16258
2009-07-08 16:10:09 +00:00
Ludovic Courtès a62e1cf2dd Disable proprietary fonts by default.
svn path=/nixos/branches/modular-nixos/; revision=16253
2009-07-08 14:52:58 +00:00
Michael Raskin 35011ade4e Adding back passthru functionality
svn path=/nixos/branches/modular-nixos/; revision=16237
2009-07-08 09:10:48 +00:00
Michael Raskin 9a66d59786 Fixing wrong assertion sign
svn path=/nixos/branches/modular-nixos/; revision=16236
2009-07-08 09:10:26 +00:00
Michael Raskin 1118c4b6d1 Fix service tree paths
svn path=/nixos/branches/modular-nixos/; revision=16235
2009-07-08 09:09:57 +00:00
Ludovic Courtès 1f9d8f45ea lshd: Fix typo; comment on the seed generation.
svn path=/nixos/branches/modular-nixos/; revision=16142
2009-07-02 14:05:01 +00:00
Ludovic Courtès 74738de1f8 Make NSS modules visible to `avahi-daemon'.
It allows it to know whether `libnss-mdns' is available, which clients
can ask via the `IsNSSSupportAvailable' D-Bus method.

svn path=/nixos/branches/modular-nixos/; revision=16125
2009-07-01 12:27:35 +00:00
Ludovic Courtès e2e373b89c bitlbee: Fix `systemPackages' attribute.
svn path=/nixos/branches/modular-nixos/; revision=16090
2009-06-30 08:01:14 +00:00
Ludovic Courtès 6566bc4882 gpsd: Fix UID/GID declaration.
svn path=/nixos/branches/modular-nixos/; revision=16089
2009-06-30 07:56:08 +00:00
Ludovic Courtès d68e177909 Oops.
svn path=/nixos/branches/modular-nixos/; revision=16064
2009-06-26 21:39:31 +00:00
Ludovic Courtès dbac392266 Fix typo in `config/nsswitch.nix'.
svn path=/nixos/branches/modular-nixos/; revision=16063
2009-06-26 21:24:18 +00:00
Nicolas Pierron 5f59ac0447 Fix a bad use of pkgs.lib.optional. (detect with bad type error on x11Packages)
svn path=/nixos/branches/modular-nixos/; revision=16053
2009-06-26 12:14:02 +00:00
Eelco Dolstra 0d5ea86748 * Merge some stuff from the trunk.
svn path=/nixos/branches/modular-nixos/; revision=16051
2009-06-26 11:36:38 +00:00
Nicolas Pierron f61a3ebd2c Generate hal configuration file form the xserver settings.
svn path=/nixos/branches/modular-nixos/; revision=16046
2009-06-25 23:29:49 +00:00
Nicolas Pierron 0bd210bb78 Fix typos in type names. (types.packages -> types.package)
svn path=/nixos/branches/modular-nixos/; revision=16045
2009-06-25 22:49:05 +00:00
Nicolas Pierron 6e802e5d75 Replace extraPackages by x11Packages for all windows/desktop managers.
-> No longer install graphical packages if the xserver is disabled.
-> avoid duplication of "mkIf config.services.xserver.enable".

svn path=/nixos/branches/modular-nixos/; revision=16044
2009-06-25 22:08:03 +00:00
Eelco Dolstra b701207ead * Typo.
svn path=/nixos/branches/modular-nixos/; revision=16039
2009-06-24 22:27:54 +00:00
Eelco Dolstra 9704472d1c Some hacks to support clean shutdowns of VMs that mount the Nix store
ove QEMU (and other NixOS instances that use a remote filesystem like
NFS):

* Don't take down the network interfaces during shutdown.
* Don't try to unmount the Nix store.  Usually, this doesn't work
  because it's still in use, but on remote filesystems like CIFS the
  `-f' umount flag actually works.

svn path=/nixos/branches/modular-nixos/; revision=16036
2009-06-24 13:33:03 +00:00
Eelco Dolstra aa075f089e * Set the default gateway.
svn path=/nixos/branches/modular-nixos/; revision=16034
2009-06-24 12:16:06 +00:00
Eelco Dolstra 1803c67d13 * Leave out HAL and d-bus (not needed).
svn path=/nixos/branches/modular-nixos/; revision=16032
2009-06-24 09:11:26 +00:00
Eelco Dolstra 2346754f5e * Don't add xterm and feh to the system path if the X server is
disabled.  Other desktop/display/window manager modules should be
  conditional on config.services.xserver.enable as well, but at least
  they're disabled by default due to other options.

svn path=/nixos/branches/modular-nixos/; revision=16031
2009-06-22 20:34:51 +00:00
Eelco Dolstra 74995fe553 * The CD volume label was just over the limit of 32 characters.
svn path=/nixos/branches/modular-nixos/; revision=16027
2009-06-22 16:38:11 +00:00
Eelco Dolstra 64d8af9677 svn path=/nixos/branches/modular-nixos/; revision=16024 2009-06-22 14:45:28 +00:00
Eelco Dolstra 0b39f614e9 * Don't wait for CIFS "devices" (//share/path) to appear since they
won't.  This speeds up booting from CIFS a lot.

svn path=/nixos/branches/modular-nixos/; revision=16023
2009-06-22 14:44:48 +00:00
Eelco Dolstra 0f6d7c8862 * Use insmod from module_init_tools in the initrd, since the latest
klibc no longer has it.

svn path=/nixos/branches/modular-nixos/; revision=16019
2009-06-22 14:10:11 +00:00
Eelco Dolstra 97a4e1fcb3 * Rename the CD modules to something more sensible.
* Make sure that reconfiguration in the live CD works properly by
  including the proper configuration module in
  /etc/nixos/configuration.nix.  Ugly.

svn path=/nixos/branches/modular-nixos/; revision=16016
2009-06-22 10:03:58 +00:00
Eelco Dolstra fc3eecad91 * Remove some references to the services tree.
svn path=/nixos/branches/modular-nixos/; revision=16015
2009-06-22 10:01:14 +00:00
Eelco Dolstra da77a6437f * qemu-vm.nix: automatically create and initialise the disk image if
it doesn't already exist.  Also set up some ad hoc port forwarding
  from the host to the guest.

svn path=/nixos/branches/modular-nixos/; revision=16012
2009-06-19 15:19:56 +00:00
Eelco Dolstra aa60f3e9a7 * sendfile() is broken over CIFS.
svn path=/nixos/branches/modular-nixos/; revision=16011
2009-06-19 14:30:56 +00:00
Eelco Dolstra d06556e274 * Get rid of the `experimental' flag.
svn path=/nixos/branches/modular-nixos/; revision=16010
2009-06-19 14:27:43 +00:00
Eelco Dolstra 9460a30851 * Use the fileSystems option to mount the host filesystem. Also, it
seems that mount.cifs isn't actually needed (anymore?).

svn path=/nixos/branches/modular-nixos/; revision=16000
2009-06-18 16:47:00 +00:00
Eelco Dolstra 8179e5213f * A module for building KVM/QEMU virtual machines from a NixOS
configuration.  No virtual disk image is generated; the VM shares a
  Nix store with the host.  This makes it very fast to build new VMs.

svn path=/nixos/branches/modular-nixos/; revision=15999
2009-06-18 16:16:12 +00:00
Eelco Dolstra e08e7aedbc * Option boot.initrd.postMountCommands to specify additional shell
commands for in stage 1 of the boot.

svn path=/nixos/branches/modular-nixos/; revision=15998
2009-06-18 16:03:18 +00:00
Eelco Dolstra c46dc8ad10 * Fix nixos-hardware-scan. BTW the model is now to do something like
$ nixos-hardware-scan > /etc/nixos/hardware.nix

  and import the hardware.nix module in /etc/nixos/configuration.nix.
  That way you can easily rescan for new hardware.

svn path=/nixos/branches/modular-nixos/; revision=15979
2009-06-17 10:41:17 +00:00
Eelco Dolstra c3ea825c23 * Fix installing from the modular branch. system/system.nix no longer
exists.  $NIXPKGS needs to be set, otherwise NixOS can't find
  Nixpkgs (because in the chroot it's in /mnt/etc/nixos/nixpkgs).
  Also clear LANG to shut up Perl warnings about the locale.

svn path=/nixos/branches/modular-nixos/; revision=15978
2009-06-17 10:07:31 +00:00
Eelco Dolstra 16937dd23d * Make fsck on journaling filesystems optional (enabled by default).
This is because fsck.ext3 takes several minutes to recover the
  journal, whereas the ext3 implementation in the kernel only takes a
  few seconds.  I'd love to know why this is the case...

svn path=/nixos/branches/modular-nixos/; revision=15965
2009-06-15 16:47:37 +00:00
Eelco Dolstra 048e03377f * Don't try to run fsck on ISO-9660/UDF filesystems.
svn path=/nixos/branches/modular-nixos/; revision=15963
2009-06-15 15:50:36 +00:00
Eelco Dolstra ff58b5dede * Booting was broken when using the "label" option.
svn path=/nixos/branches/modular-nixos/; revision=15957
2009-06-14 11:08:44 +00:00
Eelco Dolstra f258edcb80 * autocreate should be a boolean.
svn path=/nixos/branches/modular-nixos/; revision=15956
2009-06-14 11:07:44 +00:00
Eelco Dolstra 1c6bbf6784 * Add diffutils, gawk and patch to the system path.
svn path=/nixos/branches/modular-nixos/; revision=15943
2009-06-12 11:12:46 +00:00
Nicolas Pierron 6cee6e9d87 Replace special rule by a module-list.mask file which enumerates all
patterns matching the files which should not figure in module-list.nix.

svn path=/nixos/branches/modular-nixos/; revision=15941
2009-06-11 17:59:47 +00:00
Nicolas Pierron 4001b66c88 Move the option declaration of filesystems.*.neededForBoot to boot/stage-1.nix.
svn path=/nixos/branches/modular-nixos/; revision=15940
2009-06-11 16:04:03 +00:00
Nicolas Pierron 0657b26ab1 Use types in to improve filesystems.nix
svn path=/nixos/branches/modular-nixos/; revision=15939
2009-06-11 16:03:57 +00:00
Eelco Dolstra 03760c0c03 * `installation-cd-big.nix' builds a NixOS installation CD containing
an X server and KDE 4.  Thanks to squashfs it's only 466 MiB large.
  `installation-cd-small.nix' builds the original, text-only
  installation CD.

svn path=/nixos/branches/modular-nixos/; revision=15934
2009-06-11 09:51:27 +00:00
Eelco Dolstra cd1e4aefc1 * Break the cyclic dependency between the system derivation and
Grub's menu.lst.

svn path=/nixos/branches/modular-nixos/; revision=15931
2009-06-10 21:46:42 +00:00
Eelco Dolstra 1cea6b09ef * Compress the Nix store on the CD using squashfs. This reduces the
size of the i686-linux ISO image from 463 MiB to 147 MiB.  Hopefully
  it also speeds up installation due to reduced seek time and larger
  block sizes, but I haven't tested that yet (on real hardware).

svn path=/nixos/branches/modular-nixos/; revision=15930
2009-06-10 16:29:48 +00:00
Eelco Dolstra 31c6852403 * The menu.lst fragment in the top-level system derivation doesn't
seem to be used anywhere.  Removed.

svn path=/nixos/branches/modular-nixos/; revision=15928
2009-06-10 16:05:25 +00:00
Eelco Dolstra e940f1fbd7 * Cleaned up the error messages in the stage 1 init script.
* Use the basename from coreutils rather than a bash hack.

svn path=/nixos/branches/modular-nixos/; revision=15927
2009-06-10 15:02:39 +00:00
Eelco Dolstra 262ddf0854 * Move the manual/Rogue from virtual consoles 7/8 to 8/9
respectively so that the X server can run on 7.

svn path=/nixos/branches/modular-nixos/; revision=15924
2009-06-10 12:53:45 +00:00
Eelco Dolstra 135240e05f * Sigh. The nix-env call has to come after nix-store --load-db.
Should really allow an ordering between postBootCommands.

svn path=/nixos/branches/modular-nixos/; revision=15923
2009-06-10 12:51:16 +00:00
Eelco Dolstra 463cf8efdd * Provide a /etc/nixos/configuration.nix in the booted CD to make
nixos-rebuild work.  This makes it a true live CD.

svn path=/nixos/branches/modular-nixos/; revision=15922
2009-06-10 12:34:58 +00:00
Eelco Dolstra 1f8602afd2 * Get rid of the old CD/DVD expressions. live-dvd.nix is basically
rescue-dvd.nix (not tested though), i.e. it has all its extra
  packages and includes the build-time dependencies.

svn path=/nixos/branches/modular-nixos/; revision=15917
2009-06-10 11:00:29 +00:00
Eelco Dolstra ba43b5d000 * Set the CD volume ID and the ISO filename.
svn path=/nixos/branches/modular-nixos/; revision=15912
2009-06-09 15:23:03 +00:00
Eelco Dolstra 803d8b646f * Option isoImage.storeContents to add extra paths to the Nix store on
the CD.

svn path=/nixos/branches/modular-nixos/; revision=15906
2009-06-09 13:27:50 +00:00
Eelco Dolstra 45e6fe420c svn path=/nixos/branches/modular-nixos/; revision=15905 2009-06-09 13:14:43 +00:00
Eelco Dolstra 6023722135 * Provide Memtest86 as a module.
svn path=/nixos/branches/modular-nixos/; revision=15904
2009-06-09 12:02:52 +00:00
Eelco Dolstra 37edcf4fae * Provide an option to add more files to the ISO image.
svn path=/nixos/branches/modular-nixos/; revision=15903
2009-06-09 12:01:31 +00:00
Eelco Dolstra ca061eb628 * Include the NixOS/Nixpkgs trees on the CD.
svn path=/nixos/branches/modular-nixos/; revision=15897
2009-06-08 22:45:45 +00:00
Eelco Dolstra b7cad3c059 * Style fix.
svn path=/nixos/branches/modular-nixos/; revision=15896
2009-06-08 22:44:59 +00:00
Eelco Dolstra 42513650d8 svn path=/nixos/branches/modular-nixos/; revision=15895 2009-06-08 22:44:05 +00:00
Eelco Dolstra 606a8c87a1 svn path=/nixos/branches/modular-nixos/; revision=15894 2009-06-08 22:43:41 +00:00
Eelco Dolstra eb8b534173 * Include only the en_US locale on the CD. This saves 75 MiB or so.
svn path=/nixos/branches/modular-nixos/; revision=15883
2009-06-05 17:19:30 +00:00
Eelco Dolstra dbe229f3aa * $LOCALE_ARCHIVE needs to be set, otherwise the "locale" command will
fail and the ttys won't initialised in Unicode mode.

svn path=/nixos/branches/modular-nixos/; revision=15882
2009-06-05 17:18:20 +00:00
Eelco Dolstra 0a0260514d * Renamed boot.localCommands to boot.postBootCommands since it wasn't
such a good name (local to what?).

svn path=/nixos/branches/modular-nixos/; revision=15879
2009-06-05 16:02:58 +00:00
Eelco Dolstra 5cf8604b1e * Module that contains the configuration for the NixOS installation CD
(not yet complete).

svn path=/nixos/branches/modular-nixos/; revision=15878
2009-06-05 15:10:15 +00:00
Eelco Dolstra f4b5a21d59 * Fix building the manual.
svn path=/nixos/branches/modular-nixos/; revision=15877
2009-06-05 15:04:58 +00:00
Eelco Dolstra f9cfe7c4ee * The activation script can't use /bin/sh as its interpreter because
it creates the /bin/sh symlink, which may not exist yet (esp. when
  booting from CD).

svn path=/nixos/branches/modular-nixos/; revision=15875
2009-06-05 15:03:56 +00:00
Eelco Dolstra e4e408293e * Modularise the building of the installation CD/DVD. The module
iso-image.nix contains the minimal stuff necessary to build a
  bootable ISO image containing the given configuration.  The idea is
  that this can be customised by providing additional modules, e.g. to
  add extra packages to the image.

  The ISO image is exported in the configuration attribute
  system.build.isoImage.  So it can be built as follows:

  $ nix-build lib/eval-config.nix \
      --arg configuration 'import ./modules/installer/cd-dvd/iso-image.nix' \
      -A config.system.build.isoImage


svn path=/nixos/branches/modular-nixos/; revision=15871
2009-06-05 13:35:27 +00:00
Eelco Dolstra a4fa62aaf0 * The fileSystems option shouldn't have a default.
svn path=/nixos/branches/modular-nixos/; revision=15867
2009-06-05 13:30:30 +00:00
Eelco Dolstra d6617f0d5e svn path=/nixos/branches/modular-nixos/; revision=15866 2009-06-05 13:24:23 +00:00
Eelco Dolstra dc8cbffe31 * Revert r15862, as the "host" package in system-path.nix (or any other
package) can be overriden by setting environment.systemPackages in
  /etc/nixos/configuration.nix: it shouldn't be special-cased.

svn path=/nixos/branches/modular-nixos/; revision=15863
2009-06-05 12:57:44 +00:00
Michael Raskin 7e2574c4fd Let host be overriden with a better ISC Bind version if the latter is installed
svn path=/nixos/branches/modular-nixos/; revision=15862
2009-06-05 12:44:32 +00:00
Eelco Dolstra 5bcfbcac88 * We lost the "host" command somewhere.
svn path=/nixos/branches/modular-nixos/; revision=15861
2009-06-05 12:39:37 +00:00
Eelco Dolstra 021c65da98 * Quick hack in the X server job: wait until udev is running, since we
need some devices.  In particular this fixes the "Cannot open
  virtual console 7" errors in VirtualBox.  (There's nothing special
  about VirtualBox, but the different timing makes it more likely to
  trigger this bug.)

svn path=/nixos/branches/modular-nixos/; revision=15836
2009-06-03 08:14:54 +00:00
Eelco Dolstra 116306c8dc * Restart ntpd when we get a new DHCP lease. Without this, if ntpd
previously failed to resolve the NTP server hostnames in its config
  file, it will happily sit in a loop forever doing nothing.

svn path=/nixos/branches/modular-nixos/; revision=15830
2009-06-02 19:42:31 +00:00
Eelco Dolstra 674d63e212 * Don't do a separate "ntp -q -g" to reset the system time in the ntp
start script.  It's probably not necessary, but more importantly, it
  can hang forever if the network is down.  (Actually it will sit in a
  loop waiting for UDP packets that will never arrive.)  This causes
  the NixOS reboot to hang, since Upstart can't kill jobs stuck in
  their start script.

svn path=/nixos/branches/modular-nixos/; revision=15829
2009-06-02 19:40:14 +00:00
Eelco Dolstra 720d51179e * kdm needs the "kde" PAM module, but you only get it when KDE is
enabled as a session type.  Since I'm lazy, provide it
  unconditionally.  Also have it include "common-console" to set
  device ownership when logging in.

svn path=/nixos/branches/modular-nixos/; revision=15800
2009-05-29 14:57:31 +00:00
Eelco Dolstra 234c4340c2 * helpers -> lib.
svn path=/nixos/branches/modular-nixos/; revision=15797
2009-05-29 14:46:27 +00:00
Eelco Dolstra dba1d48b78 * Move the uid/gid mappings into a module. This allows other modules
to use it through config.ids.{uids,gids} rather than `import
  relative-path/ids.nix'.

svn path=/nixos/branches/modular-nixos/; revision=15796
2009-05-29 14:25:56 +00:00
Eelco Dolstra c4f50d85cb * Moved the last modules to modules/.
svn path=/nixos/branches/modular-nixos/; revision=15795
2009-05-29 14:11:02 +00:00
Eelco Dolstra 82254ce466 * Doh.
svn path=/nixos/branches/modular-nixos/; revision=15794
2009-05-29 13:30:28 +00:00
Eelco Dolstra ca0038b9b0 svn path=/nixos/branches/modular-nixos/; revision=15793 2009-05-29 13:30:12 +00:00
Eelco Dolstra 81d8c2e1c8 * Move the info wrapper into a module.
svn path=/nixos/branches/modular-nixos/; revision=15792
2009-05-29 13:29:49 +00:00
Eelco Dolstra 548fb6a1a5 * Move the optional parts of the system path to the appropriate
modules.

svn path=/nixos/branches/modular-nixos/; revision=15791
2009-05-29 13:15:31 +00:00
Eelco Dolstra 0da38f14f5 * Forgot to commit.
svn path=/nixos/branches/modular-nixos/; revision=15789
2009-05-29 12:43:29 +00:00
Eelco Dolstra f36643b6c2 * Move the installer tools to modules/installer/tools.
svn path=/nixos/branches/modular-nixos/; revision=15788
2009-05-29 12:41:29 +00:00
Eelco Dolstra df96e5c456 * Move nixos-checkout into its own module.
svn path=/nixos/branches/modular-nixos/; revision=15787
2009-05-29 12:24:48 +00:00
Eelco Dolstra 19e0f46b0e * One down, three to go.
svn path=/nixos/branches/modular-nixos/; revision=15784
2009-05-29 10:04:04 +00:00
Eelco Dolstra 107fc990a6 * More cleanup.
svn path=/nixos/branches/modular-nixos/; revision=15773
2009-05-28 16:20:08 +00:00
Eelco Dolstra c6c9304b95 * system/options.nix: gone :-)
svn path=/nixos/branches/modular-nixos/; revision=15772
2009-05-28 16:03:48 +00:00
Eelco Dolstra fc9111fadf * Move various system initialisation tasks (e.g. mounting filesystems,
initialising network interfaces, etc.) to modules/tasks.  This
  follows the Upstart terminology: a service is a job that doesn't
  usually terminate (e.g. a daemon), while a task is a job that does
  some work and then exits.

svn path=/nixos/branches/modular-nixos/; revision=15771
2009-05-28 15:03:05 +00:00
Eelco Dolstra e86b066625 * That wasn't quite right.
svn path=/nixos/branches/modular-nixos/; revision=15770
2009-05-28 14:57:31 +00:00
Eelco Dolstra fdbe09e914 * Moved the guest-users.nix module to modules/config. Clearing the
passwords is now done in an activation scriptlet rather than an
  Upstart job (not tested).  BTW, we should get rid of this module and
  add support to the users-groups.nix module for creating accounts
  with an empty password.

svn path=/nixos/branches/modular-nixos/; revision=15769
2009-05-28 14:37:30 +00:00
Eelco Dolstra 29611e49fd * More cleanup.
svn path=/nixos/branches/modular-nixos/; revision=15768
2009-05-28 13:36:38 +00:00
Eelco Dolstra 3c84d56273 * Move the /etc generation to modules/system/etc.
svn path=/nixos/branches/modular-nixos/; revision=15767
2009-05-28 13:17:56 +00:00
Eelco Dolstra 14f1c81822 * Move PAM configuration to modules/security/pam.nix.
svn path=/nixos/branches/modular-nixos/; revision=15766
2009-05-28 13:10:02 +00:00
Eelco Dolstra de7aae5d5e * Move the generation of /etc/nix.machines to the nix-daemon module.
svn path=/nixos/branches/modular-nixos/; revision=15765
2009-05-28 12:56:56 +00:00
Eelco Dolstra e4716ce3ef * Move global networking data (/etc/services, /etc/protocols,
/etc/rpc, /etc/hosts) to modules/config/networking.nix.

svn path=/nixos/branches/modular-nixos/; revision=15764
2009-05-28 12:43:54 +00:00
Eelco Dolstra ec55562ec3 * Move the configuration of the pwdutils (passwd, useradd etc.) to
modules/programs/pwdutils.
* Renamed config.system.shell to config.users.defaultUserShell and
  updated the description to make clear it has to be a non-store
  path.

svn path=/nixos/branches/modular-nixos/; revision=15761
2009-05-28 12:24:56 +00:00
Eelco Dolstra 421dcc35c5 * Moved the Bash configuration to modules/programs/bash.
svn path=/nixos/branches/modular-nixos/; revision=15759
2009-05-28 12:06:54 +00:00
Eelco Dolstra 3badebea95 * Move /etc/issue to the mingetty module.
svn path=/nixos/branches/modular-nixos/; revision=15758
2009-05-28 11:34:46 +00:00
Eelco Dolstra 2d7beac377 * New directory modules/programs that contains system-wide
configuration for specific programs.  For instance, ssh.nix provides
  the configuration for the SSH client; ssmtp.nix provides the
  configuration for the `ssmtp' MTA.

svn path=/nixos/branches/modular-nixos/; revision=15757
2009-05-27 23:59:14 +00:00
Eelco Dolstra 05a08adf91 * Move the dhclient exit hooks file to the dhclient module, where it
belongs.

svn path=/nixos/branches/modular-nixos/; revision=15755
2009-05-27 23:30:29 +00:00
Eelco Dolstra 3c6ae39a0d * Refactoring: moved some options out of system/options.nix (almost
empty now), do more of bashrc.sh declaratively, and moved nsswitch
  generation to modules/config/nsswitch.nix.

svn path=/nixos/branches/modular-nixos/; revision=15754
2009-05-27 23:14:38 +00:00
Nicolas Pierron e6ae383b9b Add a temporary work-around to be able to use non-us keyboard layout.
xkbcomp does not look inside the directory specified with the option -xkbdir.

svn path=/nixos/branches/modular-nixos/; revision=15752
2009-05-27 20:27:59 +00:00
Nicolas Pierron b022f2e95a Generate the module-list.nix which index all valid modules.
Non-valid modules are commented inside the generated list.

Move module paths which are not the module directory into the legacy.nix file.

svn path=/nixos/branches/modular-nixos/; revision=15751
2009-05-27 20:27:54 +00:00
Nicolas Pierron 054528b28d Move hardware modules outside of the module directory because these are modules which should be imported only when you need to support some of them.
svn path=/nixos/branches/modular-nixos/; revision=15750
2009-05-27 20:27:46 +00:00
Eelco Dolstra c3fb0387b4 * Moved the expressions for generating Upstart jobs.
svn path=/nixos/branches/modular-nixos/; revision=15748
2009-05-27 10:32:30 +00:00
Eelco Dolstra 700a1f8f21 * Move the modulesTree and modprobe options to the kernel.nix module.
svn path=/nixos/branches/modular-nixos/; revision=15747
2009-05-27 09:57:30 +00:00
Eelco Dolstra 690416cf1a * Move initrd-related options to the appropriate module.
svn path=/nixos/branches/modular-nixos/; revision=15746
2009-05-27 09:46:50 +00:00
Eelco Dolstra 68c3132f46 * Move the activation scripts to the appropriate module.
svn path=/nixos/branches/modular-nixos/; revision=15745
2009-05-27 09:40:55 +00:00
Eelco Dolstra cfa218a26b * Move the list of modules into a separate file. This file could be
generated by some find/grep hackery as Nicolas suggested.

svn path=/nixos/branches/modular-nixos/; revision=15743
2009-05-27 09:09:17 +00:00
Eelco Dolstra 98cce35041 * Turn the top-level derivation of a NixOS configuration ("system")
into a NixOS module (modules/system/activation/top-level.nix -
  couldn't think of a better name).  The top-level derivation is
  returned in config.system.build.system.
* Inlined system.sh in top-level.nix so that we don't have to pass
  everything through environment variables.

svn path=/nixos/branches/modular-nixos/; revision=15740
2009-05-27 09:00:45 +00:00
Eelco Dolstra 7ac0b3aaea * Make modules/system/boot/stage-1.nix a proper module that exports
the initial ramdisk as config.system.build.bootStage1.

svn path=/nixos/branches/modular-nixos/; revision=15739
2009-05-27 08:14:06 +00:00
Nicolas Pierron 47f70fda2f Fix fullDepEntry location in setuid-wrappers.nix.
svn path=/nixos/branches/modular-nixos/; revision=15733
2009-05-26 14:10:20 +00:00
Eelco Dolstra 60b3f95ad8 * Move the definition of the set of system packages to
modules/config/system-path.nix.  system/system.nix is now almost
  empty.
* Removed the cleanStart option - it should be possible to get the
  same functionality by overriding config.system.path (or defining
  config.system.systemPackages with a higher priority - don't know if
  that works though).

svn path=/nixos/branches/modular-nixos/; revision=15727
2009-05-25 17:41:03 +00:00
Eelco Dolstra c96f0d75f0 * Move the setuid wrappers activation scriptlet to
modules/security/setuid-wrappers.nix.
* Removed the "path" activation scriptlet.  The partial ordering was
  underspecified (there was nothing ensuring that it came near the end
  of the activation script), and it wasn't needed in any case.

svn path=/nixos/branches/modular-nixos/; revision=15726
2009-05-25 15:36:57 +00:00
Eelco Dolstra 278b15d840 * More moving.
svn path=/nixos/branches/modular-nixos/; revision=15725
2009-05-25 14:19:33 +00:00
Eelco Dolstra 6e066c8e1d * Idem.
svn path=/nixos/branches/modular-nixos/; revision=15724
2009-05-25 13:55:36 +00:00
Eelco Dolstra a65aae0140 * Moved more modules.
svn path=/nixos/branches/modular-nixos/; revision=15722
2009-05-25 13:42:46 +00:00
Eelco Dolstra f1fb3b45cf * No camelCase in filenames. Also pluralise the *-manager directories
for consistency.

svn path=/nixos/branches/modular-nixos/; revision=15719
2009-05-25 09:02:29 +00:00
Eelco Dolstra 5ebdee3577 * Continued refactoring the tree: moved most Upstart jobs (namely
those that run daemons) to modules/services.  This probably broke
  some things since there are a few relative paths in modules
  (e.g. imports of system/ids.nix).
* Moved some PAM modules out of etc/pam.d to the directories of NixOS
  modules that use them.

svn path=/nixos/branches/modular-nixos/; revision=15717
2009-05-24 23:13:23 +00:00
Eelco Dolstra c0209d000a svn path=/nixos/branches/modular-nixos/; revision=15703 2009-05-24 18:49:10 +00:00
Eelco Dolstra c66094a310 * Filenames should generally be in lowercase.
svn path=/nixos/branches/modular-nixos/; revision=15702
2009-05-24 18:36:32 +00:00
Eelco Dolstra be85fd2500 * "hardware" belongs in the NixOS tree, not in the configurations
tree.  (The configurations tree is not for general use.)

svn path=/nixos/branches/modular-nixos/; revision=15672
2009-05-20 10:44:50 +00:00