Commit graph

2039 commits

Author SHA1 Message Date
Florian Friesdorf 14a8532ee0 add NIX_CONF_DIR to sudo env_keep variables (suggested by Eelco Dolstra)
this enables nix-collect-garbage under sudo to respect nix.conf, e.g.:

    gc-keep-outputs = true
    gc-keep-derivations = true
2012-07-27 12:25:11 +02:00
Peter Simons e988324534 Use a dedicated user ('named') for BIND instead of running the daemon as super user. 2012-07-27 00:08:41 +02:00
Shea Levy 51765e6333 Merge pull request #20 from chaoflow/setuid-wrapper-newgrp
add setuid wrapper for newgrp
2012-07-26 11:11:10 -07:00
Florian Friesdorf 7c1c4c757c add setuid wrapper for newgrp 2012-07-26 16:52:38 +02:00
Eelco Dolstra 16da4a14f1 amazon-image.nix: Don't put any old configurations in the GRUB menu 2012-07-25 16:38:05 -04:00
Eelco Dolstra 557f39aa0f install-grub.pl: Apply the configuration limit only to old generations 2012-07-25 16:37:29 -04:00
Eelco Dolstra 8cae5e5782 Remove jfsrec from the minimal CD because it pulls in Boost 2012-07-25 11:39:41 -04:00
Eelco Dolstra b52117c34d Treat init-script as a boot loader 2012-07-25 11:30:16 -04:00
Eelco Dolstra 8b91a5f2ff Move boot loader modules to modules/system/boot/loader 2012-07-25 10:59:03 -04:00
Eelco Dolstra b15e1fbb08 Boot loader refactoring
- Renamed system.build.menuBuilder to system.build.installBootLoader.

- ‘install-grub.pl’ (formerly grub-menu-builder.pl) now generates the
  GRUB menu *and* installs GRUB (if necessary).

- ‘switch-to-configuration.sh’ has no boot loader specific knowledge
  anymore.  It just calls installBootLoader.
2012-07-25 10:47:32 -04:00
Eelco Dolstra 1b743526bd grub.nix: Handle null values
http://hydra.nixos.org/build/2894714
2012-07-25 09:27:51 -04:00
Eelco Dolstra be4c4d79cf grub-menu-builder: GRUB now installs unicode.pf2 automatically 2012-07-24 22:37:16 -04:00
Eelco Dolstra a0721ad2b3 stage-1-init: Use mount --move to move /sys etc. to the target root
This fixes warnings about /sys/kernel/security during shutdown and
cleans up /proc/mounts.
2012-07-24 22:04:28 -04:00
Eelco Dolstra fb15b1894e Add missing progress message 2012-07-24 19:27:16 -04:00
Eelco Dolstra f0c82f4543 Pass the ‘--recheck’ flag to grub-install 2012-07-24 19:22:19 -04:00
Eelco Dolstra f07f221f0e Replace grub-menu-builder with a much faster version
The old GRUB menu builder script is quite slow, typically taking
several seconds.  This is a real annoyance since it's run every time
you switch to a new configuration.  Therefore this patch replaces the
Bash script with a much faster Perl script.  In a VirtualBox test, the
execution time went from 2.7s to 0.1s.  The Perl version is also more
correct because it uses XML to get the GRUB configuration (through
builtins.toXML), so there are no shell escaping issues.

The new script currently lacks support for subconfigurations defined
through "nesting.children".
2012-07-24 19:16:27 -04:00
Eelco Dolstra b3b6b8ad60 virtualbox-image.nix: VirtualBox disks are /dev/sda, not /dev/vda 2012-07-24 19:07:03 -04:00
Phreedom cb063afcbf F-Prot virus signaure database updater: package 2012-07-24 10:52:04 +03:00
Shea Levy 0f65521df2 Merge pull request #17 from MarcWeber/fix-init-script-builder
fix init-script-builder
2012-07-23 17:44:37 -07:00
Peter Simons e8e19bbb1f modules/services/web-servers/apache-httpd: rename 'apacheHttpd' option to 'package' 2012-07-24 01:01:48 +02:00
Peter Simons b3627f6c69 modules/services/web-servers/apache-httpd: add apache user to the apache group 2012-07-23 22:00:35 +02:00
Peter Simons 52c97adaba modules/services/web-servers/apache-httpd: make this module more configurable
- The new option 'apacheHttpd' determines the version of the Apache
   HTTP Server that's being used by this module. The default version
   is Apache 2.2.x, as before.

 - The new option 'configFile' allows users specify their own custom
   config file for the web server instead of being limited to the one
   that this module generates.
2012-07-23 21:48:21 +02:00
Eelco Dolstra 5a0cf5e7b6 Use ext4 for VirtualBox images 2012-07-23 14:01:10 -04:00
Phreedom 4f109c8a3d ClamAV: package virus fingerprint database updater. 2012-07-23 17:19:59 +03:00
Marc Weber 7ddea025e4 dont hardcode apache group name when setting permissions for state dir 2012-07-23 03:28:21 +02:00
Your Name 4549bad2f4 AppArmor: packaged 2012-07-22 16:31:49 +03:00
Your Name 8bde72d99c Mount securityfs needed for AppArmor and some TPM drivers.
Should be harmless.
2012-07-22 16:31:49 +03:00
Marc Weber 3221159f5f fix init-script-builder 2012-07-21 19:26:36 +02:00
Mathijs Kwik 26bf696350 Revert "allow out-of-tree nixos modules"
This reverts commit b609ff4fcf.

It turns out this can just be done using "require".
2012-07-21 18:30:58 +02:00
Mathijs Kwik b609ff4fcf allow out-of-tree nixos modules
The environment variable "NIXOS_EXTRA_MODULES" is now checked to
contain a path to a file similar to modules/module-list.nix.

This gives the ability to include nixos modules that are not in the
nixos source tree.

This can be useful for modules that are still experimental, or which
aren't useful for other nixos users. Of course, this was already
possible to do this using a forked nixos tree, but with this
functionality, you can just rely on the nixos channel, easing things a
lot.
2012-07-21 17:35:50 +02:00
Eelco Dolstra 63742a942e Don't create /var/log/upstart/<jobname> unless necessary 2012-07-18 17:09:00 -04:00
Lluís Batlle i Rossell f43033a3f7 crashdump: it required some kernel options for the nmi_watchdog to work.
Now it says at boot, for every core:
NMI watchdog: enabled, takes one hw-pmu counter.
2012-07-18 21:50:18 +02:00
Peter Simons 4553a27a92 modules/security/pam.nix: add xscreensaver to the list of services 2012-07-17 13:01:09 +02:00
Eelco Dolstra 1d57489427 Global replace /var/run/opengl-driver -> /run/opengl-driver 2012-07-16 11:34:21 -04:00
Eelco Dolstra 98459eb675 Global replace /var/run/booted-system -> /run/booted-system 2012-07-16 11:34:21 -04:00
Eelco Dolstra 73532c3855 Global replace /var/run/current-system -> /run/current-system 2012-07-16 11:34:21 -04:00
Shea Levy 8c24de13e4 D'oh 2012-07-16 08:11:44 -04:00
Shea Levy cdd8ecf9c7 multitouch: Invert left-right scrolling when invertScroll is enabled 2012-07-16 08:03:47 -04:00
Shea Levy 3d2b83c110 multitouch: Add an option to ignore palm touches 2012-07-14 21:40:49 -04:00
Shea Levy c909ea9208 multitouch: Add option to invert scroll 2012-07-14 18:02:46 -04:00
Shea Levy e3337c7f05 Add module for b43 firmware 2012-07-13 23:54:41 -04:00
Eelco Dolstra 57d74e6f4f openssh.authorizedKeys.keyFiles: allow multiple keys
Ugly hack to get around the error "a string that refers to a store
path cannot be appended to a path".  The underlying problem is that
you cannot do

  "${./file1} ${./file2}"

but you can do

  " ${./file1} ${./file2}"

Obviously we should allow the first case as well.
2012-07-13 17:59:03 -04:00
Eelco Dolstra 7e77dae458 sshd.nix: Create ~/.ssh/authorized_keys with the right ownership 2012-07-13 11:48:47 -04:00
Eelco Dolstra 7fca8ceaf8 /etc/login.defs: set the mode of new home directories to 700 2012-07-13 10:41:48 -04:00
Shea Levy 8544ba285d logstash: Fix sloppy description fields 2012-07-12 14:35:06 -04:00
Shea Levy a2b59f595f logstash: Export config.lib.logstash.mk{Float,Hash,NameValuePairs}.
This allows hiding the implementation details for how to represent logstash
config types that don't directly map to nix expressions, particularly floats,
hashes, and name-value pair sets with repeated names. Instead of setting
__type and value directly, the user now uses these convenience functions to
generate their logstash config.
2012-07-12 14:15:43 -04:00
Shea Levy 8712e1dafc Add lib module for modules to provide helper functions 2012-07-12 13:46:04 -04:00
Peter Simons 0c12e29368 Don't add the i3 window manager to the system if it isn't enabled in configuration.nix. 2012-07-12 11:33:10 +02:00
Eelco Dolstra 7de6a7e8b0 Rename time.clockLocal -> time.hardwareClockInLocalTime. 2012-07-11 15:33:34 -04:00
Carles Pagès 008493f94c Add option to keep hardware clock in local time. 2012-07-11 15:31:46 -04:00
Shea Levy 5412b1089f logstash: Start process in /tmp
See https://logstash.jira.com/browse/LOGSTASH-107
2012-07-11 13:45:36 -04:00
Shea Levy 315087def1 logstash: use {name=; value='} attrsets for repeated name-value pairs instead of parallel lists 2012-07-11 11:59:00 -04:00
Shea Levy 3039caf5ad Add logstash module.
Since the logstash config file seemed very similar to a nixexpr, I decided
to map directly from nixexprs to logstash configs. I didn't realize until
too far in that this solution was probably way over-engineered, but it
works.
2012-07-11 11:22:16 -04:00
Rok Garbas b7398794ed i3 window manager was not installed when enabled 2012-07-10 16:07:53 +02:00
Eelco Dolstra fbf9ecf78a Apache: make /var/run/httpd readable to wwwrun, as required by mod_cgid 2012-07-09 16:27:39 +02:00
Eelco Dolstra d0c9a3ce32 Apache: build PHP against the right httpd
If httpd is built with a threaded MPM, then PHP needs to be built with
thread support as well.
2012-07-06 23:28:46 +02:00
Eelco Dolstra 18031e41bb Apache: Add an option to set the MPM
Supported values are "prefork" (default), "worker" and "event"
(experimental in Apache 2.2 but not 2.4).
2012-07-06 14:23:55 -04:00
Eelco Dolstra a07eb262a0 Apache: don't fork into the background due to Upstart weirdness
If Apache crashes during startup, Upstart for some reason shows the
job in the "start/running" state.  As a workaround, don't fork.
2012-07-06 13:47:42 -04:00
Eelco Dolstra 46dce21bff MediaWiki: Generalise the skins support
The new option ‘skins’ allows specifying a list of directories
providing skins to be added to the MediaWiki installation.  The
‘defaultSkin’ option just sets the default.
2012-07-05 21:04:23 +02:00
Mathijs Kwik a630b1f6f6 EFI shell got updated upstream, reflecting new hash 2012-07-05 08:31:44 +02:00
Eelco Dolstra 348691645d Remove broken "nopipefail" option
http://hydra.nixos.org/build/2751337
2012-07-02 10:57:36 -04:00
Peter Simons 56373744b4 modules/config/networking.nix: recognize whether a local DNS resolver is available
resolvconf prefers a locally running BIND resolver over the forwarders; we just
have to tell it whether we have one or not. We use 'config.services.bind.enable'
to make that decision, assuming that people are not going to configure a local
BIND that won't respond to queries on 127.0.0.1. If we run into such a (weird)
case, then we'll need to introduce another variable for that purpose which can
be set independently from 'config.services.bind.enable'.
2012-07-02 15:01:02 +02:00
Peter Simons f22dbd5e05 modules/services/networking/wpa_supplicant.nix: strip trailing whitespace 2012-06-29 11:53:16 +02:00
Peter Simons 61b8ee9029 modules/services/networking/wpa_supplicant.nix: document that interface auto-detection doesn't work on Linux 3.4.x 2012-06-29 11:53:16 +02:00
Eelco Dolstra 76c74cd7c7 initrd: Detect filesystem type before doing fsck/mount
BusyBox doesn't handle the "auto" filesystem type very well: fsck will
just ignore such filesystems, and mount will only work properly if the
required kernel module is already loaded.  Therefore, use blkid to
determine the filesystem type.

Also generate an /etc/fstab in the initrd rootfs on the fly.  This is
useful if you're dropped into an emergency shell since it allows you
to say "fsck /dev/sda1" or "mount /dev/sda" and have the right thing
happen.
2012-06-28 10:55:44 -04:00
viric 7acfd8ec20 Merge pull request #9 from viric/pull-pipefail
nixos-rebuild: make 'pull' fail in case it did not pull anything.
2012-06-28 01:20:22 -07:00
Lluís Batlle i Rossell 34e8f68056 system-tarball-pc: not use boot.initrd.extraTools anymore
Eelco removed the option recently, making the default initrd have the full
busybox.

I saw this evaluation error in the hydra nixos trunk page.
2012-06-27 22:26:27 +02:00
Lluís Batlle i Rossell de87b07bb3 nixos-rebuild: fail if any case of pull fails. 2012-06-27 21:57:15 +02:00
Lluís Batlle i Rossell 5b7c019e2a nixos-rebuild: make 'pull' fail in case it did not pull anything. 2012-06-27 21:36:46 +02:00
David Guibert dbe2325603 fix the grep pattern finding programs called by absolute paths in udev rules. 2012-06-27 20:41:07 +02:00
Shea Levy bb5d2d53fe try isn't used, so use the more compatct seq 10 2012-06-27 09:43:54 -04:00
Mathijs Kwik 061a998840 luks root: c-style for-loop -> seq
The ash shell no longer supports this bash-specific syntax.
This left systems that use luksroot unable to boot.
2012-06-27 09:42:55 -04:00
Eelco Dolstra e64bdda52b Don't use weird 777 permissions on unmounted /dev/shm 2012-06-27 09:35:53 -04:00
Eelco Dolstra cc357c7e64 nixos-rebuild: Add a convenience option ‘--upgrade’
This is equivalent to running ‘nix-channel --update nixos’ before
running ‘nixos-rebuild’.
2012-06-25 16:17:34 -04:00
Eelco Dolstra 7613ae950a Fix booting on EC2
The kill command in ash doesn't know the "--" syntax, but doesn't need
it either.
2012-06-24 19:02:34 -04:00
Eelco Dolstra 6bd32f0a27 Drop the socat wrapper 2012-06-22 15:37:22 -04:00
Eelco Dolstra 1da7cea223 Add Busybox to the installation CD
This is mostly to get the automated tests to succeed.
2012-06-22 14:16:55 -04:00
Eelco Dolstra 980ba4d5a5 stage-1: mount /proc, /sys, /dev in the target root
The switch_root in BusyBox doesn't do this (while the one in
util-linux does).  So we have to do this ourselves.
2012-06-22 13:51:42 -04:00
Eelco Dolstra 598adfee3e Fix booting from the CD-ROM
So it turns out that BusyBox doesn't auto-load modules for filesystems
that have type "auto", e.g. it doesn't figure out that it should load
the "iso9660" module should be loaded when mounting the CD-ROM.  We
don't want to give the root FS on the CD type "iso9660", because that
breaks booting from a USB stick created by unetbootin.  So make sure
the "iso9660" module is loaded.
2012-06-22 11:55:23 -04:00
Eelco Dolstra 7b54922227 Don't include klibc in the installation CD 2012-06-22 11:39:27 -04:00
Eelco Dolstra 9692495df0 Use BusyBox in the initrd
Using BusyBox instead of Bash plus a bunch of other tools gives us a
much more feature-full, yet smaller initrd.  In particular, BusyBox
contains networking commands such as ip and a DHCP client, useful for
NFS boots.  It's also much more convenient for rescue situations
because the shell has builtin readline support and there are many more
tools (including vi).
2012-06-22 10:43:06 -04:00
Eelco Dolstra 70089950d2 nixos-version: "pre-svn" -> "pre-git" 2012-06-22 10:28:06 -04:00
Rob Vermaas df124ebc89 * Make sure time.timeZone can only be defined once. 2012-06-21 12:47:44 +02:00
Eelco Dolstra 055eae2a58 Merge pull request #1 from aszlig/i3_integration
Add xserver integration of i3 WM.
2012-06-20 20:49:45 -07:00
Mathijs Kwik bd5b06bf86 synaptics driver: accelleration factor config option
svn path=/nixos/trunk/; revision=34523
2012-06-16 11:13:48 +00:00
Eelco Dolstra c9be63b83e * Use ‘nologin’ as the default shell for user accounts that are not
allowed to log in.

svn path=/nixos/trunk/; revision=34514
2012-06-14 21:33:59 +00:00
Eelco Dolstra fd9604b319 * Oops, fix an incomplete commit.
svn path=/nixos/trunk/; revision=34488
2012-06-13 03:28:03 +00:00
Eelco Dolstra 63517eca1b * Actually use the security.pam.enableSSHAgentAuth option.
http://hydra.nixos.org/build/2698800

svn path=/nixos/trunk/; revision=34483
2012-06-12 20:21:15 +00:00
Eelco Dolstra 15d44498f9 * Add a ‘size’ option to ‘swapDevices’ to create swapfiles on the fly.
svn path=/nixos/trunk/; revision=34478
2012-06-12 13:41:51 +00:00
Eelco Dolstra 03653d43eb * Add support for sudo authentication using the SSH agent. This
allows password-less servers.

svn path=/nixos/trunk/; revision=34474
2012-06-11 22:41:07 +00:00
Eelco Dolstra a3118792a5 * Make the ACPI Shutdown command in VirtualBox to do the right thing.
svn path=/nixos/trunk/; revision=34473
2012-06-11 22:37:55 +00:00
Lluís Batlle i Rossell a257bf78cb Making the virtualbox-guest module be evaluated only in i686 and x86_64.
On mips, an assertion in the nixpkgs virtualbox was failing.


svn path=/nixos/trunk/; revision=34464
2012-06-11 17:31:03 +00:00
Peter Simons 51b5da4023 modules/security/pam.nix: sort security.pam.services alphabetically
svn path=/nixos/trunk/; revision=34437
2012-06-11 07:12:41 +00:00
Peter Simons 5c3593be46 Add PAM configuration for vlock.
svn path=/nixos/trunk/; revision=34436
2012-06-11 07:12:39 +00:00
Peter Simons 4c54fcaf45 pam security for i3lock
svn path=/nixos/trunk/; revision=34435
2012-06-11 07:10:25 +00:00
Peter Simons 25155a02e6 Add findutils dependency for /tmp cleaning.
This dependency is only added if the setting is activated.

svn path=/nixos/trunk/; revision=34434
2012-06-11 07:05:15 +00:00
Peter Simons 4931188684 Integrate cleanTmpDir in stage-2-init.sh.
We're using find in order to remove dotfiles, too.

svn path=/nixos/trunk/; revision=34433
2012-06-11 07:05:13 +00:00
Peter Simons fbf53168f3 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
2012-06-11 07:05:11 +00:00
Lluís Batlle i Rossell 9125d3af50 Adding creation of /dev/ptmx in stage-2, in case stage-1 did not run.
Upstart requires /dev/ptmx since its 1.4, and will lock up in case of it missing.

I was hitting this in the fuloong, where I don't use the nixos initrd.


svn path=/nixos/trunk/; revision=34429
2012-06-10 22:37:20 +00:00
Lluís Batlle i Rossell 3d2ed19067 Making fcron use the daemonType=fork, instead of foreground. This way logrotate
does not have to handle it appart.


svn path=/nixos/trunk/; revision=34422
2012-06-10 15:14:16 +00:00