Browse Source

strip trailing whitespace; no functional change

svn path=/nixos/trunk/; revision=29285
nsd-state-dir
Peter Simons 11 years ago
parent
commit
eb6e1310b8
  1. 4
      default.nix
  2. 2
      doc/config-examples/basic.nix
  3. 6
      doc/config-examples/closed-install-configuration.nix
  4. 10
      doc/config-examples/svn-server.nix
  5. 6
      doc/manual/default.nix
  6. 14
      lib/build-vms.nix
  7. 4
      lib/make-iso9660-image.nix
  8. 6
      lib/make-squashfs.nix
  9. 4
      lib/make-system-tarball.nix
  10. 34
      lib/testing.nix
  11. 2
      maintainers/option-usages.nix
  12. 10
      modules/config/fonts.nix
  13. 2
      modules/config/krb5.nix
  14. 2
      modules/config/ldap.nix
  15. 2
      modules/config/networking.nix
  16. 16
      modules/config/power-management.nix
  17. 14
      modules/config/pulseaudio.nix
  18. 2
      modules/config/shells.nix
  19. 8
      modules/config/swap.nix
  20. 8
      modules/config/system-path.nix
  21. 6
      modules/config/unix-odbc-drivers.nix
  22. 14
      modules/config/users-groups.nix
  23. 8
      modules/hardware/network/intel-2100bg.nix
  24. 8
      modules/hardware/network/intel-2200bg.nix
  25. 8
      modules/hardware/network/intel-3945abg.nix
  26. 6
      modules/hardware/network/rt73.nix
  27. 6
      modules/hardware/network/rtl8192c.nix
  28. 2
      modules/hardware/video/encoder/wis-go7007.nix
  29. 6
      modules/installer/cd-dvd/installation-cd-base.nix
  30. 18
      modules/installer/cd-dvd/iso-image.nix
  31. 20
      modules/installer/cd-dvd/live-dvd.nix
  32. 8
      modules/installer/cd-dvd/system-tarball-fuloong2f.nix
  33. 12
      modules/installer/cd-dvd/system-tarball-pc.nix
  34. 6
      modules/installer/cd-dvd/system-tarball-sheevaplug.nix
  35. 2
      modules/installer/cd-dvd/system-tarball.nix
  36. 10
      modules/installer/grub/grub.nix
  37. 8
      modules/installer/init-script/init-script.nix
  38. 2
      modules/installer/tools/nixos-checkout.nix
  39. 46
      modules/installer/tools/nixos-deploy-network/deploy.nix
  40. 4
      modules/misc/assertions.nix
  41. 14
      modules/misc/deployment.nix
  42. 4
      modules/misc/ids.nix
  43. 2
      modules/misc/locate.nix
  44. 2
      modules/misc/nixpkgs.nix
  45. 6
      modules/misc/passthru.nix
  46. 2
      modules/profiles/installation-device.nix
  47. 10
      modules/profiles/rescue.nix
  48. 8
      modules/programs/bash/bash.nix
  49. 2
      modules/programs/info.nix
  50. 18
      modules/programs/shadow.nix
  51. 2
      modules/security/ca.nix
  52. 2
      modules/security/consolekit.nix
  53. 6
      modules/security/policykit.nix
  54. 8
      modules/security/polkit.nix
  55. 4
      modules/security/rtkit.nix
  56. 6
      modules/security/setuid-wrappers.nix
  57. 2
      modules/security/sudo.nix
  58. 6
      modules/services/amqp/rabbitmq.nix
  59. 14
      modules/services/audio/alsa.nix
  60. 10
      modules/services/audio/pulseaudio.nix
  61. 12
      modules/services/backup/mysql-backup.nix
  62. 10
      modules/services/backup/postgresql-backup.nix
  63. 20
      modules/services/backup/sitecopy-backup.nix
  64. 6
      modules/services/databases/4store-endpoint.nix
  65. 6
      modules/services/databases/4store.nix
  66. 48
      modules/services/databases/mysql.nix
  67. 6
      modules/services/databases/openldap.nix
  68. 30
      modules/services/databases/postgresql.nix
  69. 6
      modules/services/databases/virtuoso.nix
  70. 6
      modules/services/games/ghost-one.nix
  71. 24
      modules/services/hardware/acpid.nix
  72. 10
      modules/services/hardware/bluetooth.nix
  73. 16
      modules/services/hardware/hal.nix
  74. 12
      modules/services/hardware/pcscd.nix
  75. 24
      modules/services/hardware/udev.nix
  76. 10
      modules/services/hardware/udisks.nix
  77. 10
      modules/services/hardware/upower.nix
  78. 2
      modules/services/logging/klogd.nix
  79. 30
      modules/services/mail/dovecot.nix
  80. 2
      modules/services/mail/freepops.nix
  81. 4
      modules/services/mail/mail.nix
  82. 92
      modules/services/mail/postfix.nix
  83. 10
      modules/services/misc/autofs.nix
  84. 36
      modules/services/misc/disnix.nix
  85. 32
      modules/services/misc/felix.nix
  86. 8
      modules/services/misc/folding-at-home.nix
  87. 10
      modules/services/misc/gpsd.nix
  88. 28
      modules/services/misc/nix-daemon.nix
  89. 8
      modules/services/misc/nixos-manual.nix
  90. 10
      modules/services/misc/rogue.nix
  91. 18
      modules/services/misc/svnserve.nix
  92. 18
      modules/services/misc/synergy.nix
  93. 16
      modules/services/misc/virtualbox.nix
  94. 10
      modules/services/monitoring/monit.nix
  95. 10
      modules/services/monitoring/nagios/default.nix
  96. 2
      modules/services/monitoring/systemhealth.nix
  97. 4
      modules/services/monitoring/ups.nix
  98. 10
      modules/services/monitoring/zabbix-agent.nix
  99. 8
      modules/services/monitoring/zabbix-server.nix
  100. 26
      modules/services/network-filesystems/nfs-kernel.nix

4
default.nix

@ -3,7 +3,7 @@
}:
let
eval = import ./lib/eval-config.nix {
inherit system;
modules = [ configuration ];
@ -26,7 +26,7 @@ let
{ virtualisation.useBootLoader = true; }
];
}).config;
in
{

2
doc/config-examples/basic.nix

@ -12,7 +12,7 @@
swapDevices = [
{ device = "/dev/sdb1"; }
];
services = {
openssh = {
enable = true;

6
doc/config-examples/closed-install-configuration.nix

@ -18,15 +18,15 @@
swapDevices = [
{ device = "/dev/sda2"; }
];
services = {
sshd = {
enable = true;
};
};
fonts = {
enableFontConfig = false;
fonts = {
enableFontConfig = false;
};
}

10
doc/config-examples/svn-server.nix

@ -2,7 +2,7 @@
boot = {
grubDevice = "/dev/sda";
};
fileSystems = [
{ mountPoint = "/";
device = "/dev/sda1";
@ -10,7 +10,7 @@
];
services = {
sshd = {
enable = true;
};
@ -28,9 +28,9 @@
};
};
};
};
}

6
doc/manual/default.nix

@ -3,7 +3,7 @@
, revision ? "HEAD"
}:
let
let
# To prevent infinite recursion, remove system.path from the
# options. Not sure why this happens.
@ -59,7 +59,7 @@ in rec {
ln -s ${pkgs.docbook5_xsl}/xml/xsl/docbook/images $dst/
cp ${./style.css} $dst/style.css
ensureDir $out/nix-support
echo "doc manual $dst manual.html" >> $out/nix-support/hydra-build-products
'';
@ -93,4 +93,4 @@ in rec {
'';
};
}
}

14
lib/build-vms.nix

@ -9,7 +9,7 @@ rec {
inherit pkgs;
# Build a virtual network from an attribute set `{ machine1 =
# config1; ... machineN = configN; }', where `machineX' is the
# hostname and `configX' is a NixOS system configuration. Each
@ -38,7 +38,7 @@ rec {
assignIPAddresses = nodes:
let
machines = lib.attrNames nodes;
machinesNumbered = lib.zipTwoLists machines (lib.range 1 254);
@ -47,7 +47,7 @@ rec {
[ ( { config, pkgs, nodes, ... }:
let
interfacesNumbered = lib.zipTwoLists config.virtualisation.vlans (lib.range 1 255);
interfaces =
interfaces =
lib.flip map interfacesNumbered ({ first, second }:
{ name = "eth${toString second}";
ipAddress = "192.168.${toString first}.${toString m.second}";
@ -58,12 +58,12 @@ rec {
{ key = "ip-address";
config =
{ networking.hostName = m.first;
networking.interfaces = interfaces;
networking.primaryIPAddress =
lib.optionalString (interfaces != []) (lib.head interfaces).ipAddress;
# Put the IP addresses of all VMs in this machine's
# /etc/hosts file. If a machine has multiple
# interfaces, use the IP address corresponding to
@ -74,7 +74,7 @@ rec {
lib.optionalString (config.networking.primaryIPAddress != "")
("${config.networking.primaryIPAddress} " +
"${config.networking.hostName}\n"));
virtualisation.qemu.options =
lib.flip map interfacesNumbered
({ first, second }: qemuNICFlags second first m.second);

4
lib/make-iso9660-image.nix

@ -36,7 +36,7 @@ stdenv.mkDerivation {
name = "iso9660-image";
builder = ./make-iso9660-image.sh;
buildInputs = [perl cdrkit];
inherit isoName bootable bootImage compressImage volumeID pathsFromGraph;
# !!! should use XML.
@ -46,7 +46,7 @@ stdenv.mkDerivation {
# !!! should use XML.
objects = map (x: x.object) storeContents;
symlinks = map (x: x.symlink) storeContents;
# For obtaining the closure of `storeContents'.
exportReferencesGraph =
map (x: [("closure-" + baseNameOf x.object) x.object]) storeContents;

6
lib/make-squashfs.nix

@ -7,9 +7,9 @@
stdenv.mkDerivation {
name = "squashfs.img";
buildInputs = [perl squashfsTools];
# For obtaining the closure of `storeContents'.
exportReferencesGraph =
map (x: [("closure-" + baseNameOf x) x]) storeContents;
@ -18,7 +18,7 @@ stdenv.mkDerivation {
''
# Add the closures of the top-level store objects.
storePaths=$(perl ${pathsFromGraph} closure-*)
# Also include a manifest of the closures in a format suitable
# for nix-store --load-db.
printRegistration=1 perl ${pathsFromGraph} closure-* > nix-path-registration

4
lib/make-system-tarball.nix

@ -21,7 +21,7 @@ stdenv.mkDerivation {
name = "tarball";
builder = ./make-system-tarball.sh;
buildInputs = [perl xz];
inherit fileName pathsFromGraph;
# !!! should use XML.
@ -31,7 +31,7 @@ stdenv.mkDerivation {
# !!! should use XML.
objects = map (x: x.object) storeContents;
symlinks = map (x: x.symlink) storeContents;
# For obtaining the closure of `storeContents'.
exportReferencesGraph =
map (x: [("closure-" + baseNameOf x.object) x.object]) storeContents;

34
lib/testing.nix

@ -14,13 +14,13 @@ rec {
buildInputs = [ makeWrapper perl ];
unpackPhase = "true";
installPhase =
''
mkdir -p $out/bin
cp ${./test-driver/test-driver.pl} $out/bin/nixos-test-driver
chmod u+x $out/bin/nixos-test-driver
libDir=$out/lib/perl5/site_perl
mkdir -p $libDir
cp ${./test-driver/Machine.pm} $libDir/Machine.pm
@ -38,9 +38,9 @@ rec {
runTests = driver:
stdenv.mkDerivation {
name = "vm-test-run";
requiredSystemFeatures = [ "kvm" ];
buildInputs = [ pkgs.libxslt ];
buildCommand =
@ -49,7 +49,7 @@ rec {
LOGFILE=$out/log.xml tests='eval $ENV{testScript}; die $@ if $@;' ${driver}/bin/nixos-test-driver || failed=1
# Generate a pretty-printed log.
# Generate a pretty-printed log.
xsltproc --output $out/log.html ${./test-driver/log2html.xsl} $out/log.xml
ln -s ${./test-driver/logfile.css} $out/logfile.css
ln -s ${./test-driver/treebits.js} $out/treebits.js
@ -96,12 +96,12 @@ rec {
done
find $TMPDIR/gcov -name "*.gcda" -exec chmod 644 {} \;
echo "producing info..."
${pkgs.lcov}/bin/geninfo --ignore-errors source,gcov $TMPDIR/gcov --output-file $TMPDIR/app.info
cat $TMPDIR/app.info >> $TMPDIR/full.info
done
echo "making report..."
mkdir -p $out/coverage
${pkgs.lcov}/bin/genhtml --show-details $TMPDIR/full.info -o $out/coverage
@ -131,11 +131,11 @@ rec {
if builtins.isFunction t.testScript
then t.testScript { inherit nodes; }
else t.testScript;
vlans = map (m: m.config.virtualisation.vlans) (lib.attrValues nodes);
vms = map (m: m.config.system.build.vm) (lib.attrValues nodes);
# Generate onvenience wrappers for running the test driver
# interactively with the specified network, and for starting the
# VMs from the command line.
@ -161,11 +161,11 @@ rec {
''; # "
test = runTests driver;
report = makeReport test;
};
runInMachine =
{ drv
, machine
@ -181,12 +181,12 @@ rec {
buildrunner = writeText "vm-build" ''
source $1
${coreutils}/bin/mkdir -p $TMPDIR
cd $TMPDIR
$origBuilder $origArgs
exit $?
'';
@ -211,10 +211,10 @@ rec {
builder = "${bash}/bin/sh";
args = ["-e" vmRunCommand];
origArgs = attrs.args;
origBuilder = attrs.builder;
origBuilder = attrs.builder;
});
runInMachineWithX = { require ? [], ... } @ args:
let
client =
@ -238,7 +238,7 @@ rec {
'';
} // args);
simpleTest = as: (makeTest ({ ... }: as)).test;
}

2
maintainers/option-usages.nix

@ -17,7 +17,7 @@
# there dependencies to track problems and their sources.
let
evalFun = {
extraArgs ? {}
}: import ../lib/eval-config.nix {

10
modules/config/fonts.nix

@ -35,8 +35,8 @@ let
enableFontDir = mkOption {
default = false;
description = "
Whether to create a directory with links to all fonts in share -
so user can configure vncserver script one time (I mean per-user
Whether to create a directory with links to all fonts in share -
so user can configure vncserver script one time (I mean per-user
vncserver, so global service is not a good solution).
";
};
@ -122,7 +122,7 @@ let
for i in \$list ; do
fontDirs=\"\$fontDirs \$(dirname \$i)\";
done;
mkdir -p \$out/share/X11-fonts/;
mkdir -p \$out/share/X11-fonts/;
find \$fontDirs -type f -o -type l | while read i; do
j=\"\${i##*/}\"
if ! test -e \"\$out/share/X11-fonts/\${j}\"; then
@ -142,7 +142,7 @@ let
x11Fonts = with localDefs; stdenv.mkDerivation rec {
name = "X11-fonts";
builder = writeScript (name + "-builder")
(textClosure localDefs
(textClosure localDefs
[installPhase doForceShare doPropagate]);
meta = {
description = "
@ -169,7 +169,7 @@ in
];
environment.shellInit =
''
''
export FONTCONFIG_FILE=/etc/fonts/fonts.conf
'';

2
modules/config/krb5.nix

@ -29,7 +29,7 @@ let
description = "Kerberos Domain Controller";
};
kerberosAdminServer = mkOption {
kerberosAdminServer = mkOption {
default = "kerberos.mit.edu";
description = "Kerberos Admin Server";
};

2
modules/config/ldap.nix

@ -69,7 +69,7 @@ mkIf config.users.ldap.enable {
'';
target = "ldap.conf";
}
];
};

2
modules/config/networking.nix

@ -13,7 +13,7 @@ let
Additional entries to be appended to <filename>/etc/hosts</filename>.
'';
};
};
in

16
modules/config/power-management.nix

@ -28,7 +28,7 @@ in
###### interface
options = {
powerManagement = {
enable = mkOption {
@ -44,7 +44,7 @@ in
default = "";
description = "Commands executed after the system resumes from suspend-to-RAM.";
};
powerUpCommands = mkOption {
default = "";
example = "${pkgs.hdparm}/sbin/hdparm -B 255 /dev/sda";
@ -66,11 +66,11 @@ in
it goes to suspend or hibernation.
'';
};
};
};
###### implementation
@ -86,11 +86,11 @@ in
target = "pm/sleep.d/00sleep-hook";
};
boot.kernelModules =
[ "acpi_cpufreq" "cpufreq_performance" "cpufreq_powersave" "cpufreq_ondemand"
boot.kernelModules =
[ "acpi_cpufreq" "cpufreq_performance" "cpufreq_powersave" "cpufreq_ondemand"
"p4_clockmod"
];
};
}

14
modules/config/pulseaudio.nix

@ -7,7 +7,7 @@ let cfg = config.hardware.pulseaudio; in
{
options = {
hardware.pulseaudio.enable = mkOption {
default = false;
description = ''
@ -26,7 +26,7 @@ let cfg = config.hardware.pulseaudio; in
};
};
config = mkIf cfg.enable {
@ -46,7 +46,7 @@ let cfg = config.hardware.pulseaudio; in
''}
'';
}
] ++ optionals cfg.enable
[ # Write an /etc/asound.conf that causes all ALSA applications to
# be re-routed to the PulseAudio server through ALSA's Pulse
@ -57,16 +57,16 @@ let cfg = config.hardware.pulseaudio; in
pcm_type.pulse {
lib ${pkgs.alsaPlugins}/lib/alsa-lib/libasound_module_pcm_pulse.so
}
pcm.!default {
type pulse
hint.description "Default Audio Device (via PulseAudio)"
}
ctl_type.pulse {
lib ${pkgs.alsaPlugins}/lib/alsa-lib/libasound_module_ctl_pulse.so
}
ctl.!default {
type pulse
}
@ -85,7 +85,7 @@ let cfg = config.hardware.pulseaudio; in
# Allow PulseAudio to get realtime priority using rtkit.
security.rtkit.enable = true;
};
}

2
modules/config/shells.nix

@ -18,6 +18,6 @@ with pkgs.lib;
'';
};
};
};
}

8
modules/config/swap.nix

@ -5,7 +5,7 @@ with pkgs.lib;
{
###### interface
options = {
swapDevices = mkOption {
@ -30,7 +30,7 @@ with pkgs.lib;
options = {config, options, ...}: {
options = {
device = mkOption {
example = "/dev/sda3";
type = types.string;
@ -64,9 +64,9 @@ with pkgs.lib;
else
mkNotdef;
};
};
};
};

8
modules/config/system-path.nix

@ -8,7 +8,7 @@ with pkgs.lib;
let
cfg = config.environment;
requiredPackages =
[ config.system.sbin.modprobe # must take precedence over module_init_tools
config.system.sbin.mount # must take precedence over util-linux
@ -91,7 +91,7 @@ let
description = ''
The packages you want in the boot environment.
'';
apply = list: pkgs.buildEnv {
name = "system-path";
paths = list;
@ -109,11 +109,11 @@ let
fi
'';
};
};
};
};

6
modules/config/unix-odbc-drivers.nix

@ -10,7 +10,7 @@ let
default = [];
example = "map (x : x.ini) (with pkgs.unixODBCDrivers; [ mysql psql psqlng ] )";
description = ''
specifies unix odbc drivers to be registered at /etc/odbcinst.ini.
specifies unix odbc drivers to be registered at /etc/odbcinst.ini.
Maybe you also want to add pkgs.unixODBC to the system path to get a
command line client t connnect to odbc databases.
'';
@ -30,10 +30,10 @@ mkIf (config.environment.unixODBCDrivers != []) {
require = [
options
];
environment = {
etc = [
{ source =
{ source =
let inis = config.environment.unixODBCDrivers;
in pkgs.writeText "odbcinst.ini" (pkgs.lib.concatStringsSep "\n" inis);
target = "odbcinst.ini";

14
modules/config/users-groups.nix

@ -6,7 +6,7 @@ let
ids = config.ids;
# User accounts to be created/updated by NixOS.
users =
let
@ -46,7 +46,7 @@ let
# Groups to be created/updated by NixOS.
groups =
let
defaultGroups =
defaultGroups =
[ { name = "root";
gid = ids.gids.root;
}
@ -108,10 +108,10 @@ let
# having an empty password, and not having a password.
serializedUser = u: "${u.name}\n${u.description}\n${toString u.uid}\n${u.group}\n${toString (concatStringsSep "," u.extraGroups)}\n${u.home}\n${u.shell}\n${toString u.createHome}\n${if u.password != null then "X" + u.password else ""}\n${toString u.isSystemUser}\n";
serializedGroup = g: "${g.name}\n${toString g.gid}";
# keep this extra file so that cat can be used to pass special chars such as "`" which is used in the avahi daemon
usersFile = pkgs.writeText "users" (concatStrings (map serializedUser users));
in
{
@ -119,7 +119,7 @@ in
###### interface
options = {
users.extraUsers = mkOption {
default = [];
example =
@ -152,7 +152,7 @@ in
};
};
###### implementation
@ -230,7 +230,7 @@ in
system.activationScripts.groups = stringAfter [ "rootPasswd" "binsh" "etc" "var" ]
''
echo "updating groups..."
while true; do
read name || break
read gid

8
modules/hardware/network/intel-2100bg.nix

@ -5,7 +5,7 @@
###### interface
options = {
networking.enableIntel2100BGFirmware = pkgs.lib.mkOption {
default = false;
type = pkgs.lib.types.bool;
@ -22,13 +22,13 @@
###### implementation
config = pkgs.lib.mkIf config.networking.enableIntel2100BGFirmware {
# Warning: setting this option requires acceptance of the firmware
# license, see http://ipw2100.sourceforge.net/firmware.php?fid=2.
hardware.firmware = [ pkgs.ipw2100fw ];
};
}

8
modules/hardware/network/intel-2200bg.nix

@ -5,7 +5,7 @@
###### interface
options = {
networking.enableIntel2200BGFirmware = pkgs.lib.mkOption {
default = false;
type = pkgs.lib.types.bool;
@ -22,13 +22,13 @@
###### implementation
config = pkgs.lib.mkIf config.networking.enableIntel2200BGFirmware {
# Warning: setting this option requires acceptance of the firmware
# license, see http://ipw2200.sourceforge.net/firmware.php?fid=7.
hardware.firmware = [ pkgs.ipw2200fw ];
};
}

8
modules/hardware/network/intel-3945abg.nix

@ -5,7 +5,7 @@
###### interface
options = {
networking.enableIntel3945ABGFirmware = pkgs.lib.mkOption {
default = false;
type = pkgs.lib.types.bool;
@ -19,11 +19,11 @@
###### implementation
config = pkgs.lib.mkIf config.networking.enableIntel3945ABGFirmware {
hardware.firmware = [ pkgs.iwlwifi3945ucode ];
};
}

6
modules/hardware/network/rt73.nix

@ -5,7 +5,7 @@
###### interface
options = {
networking.enableRT73Firmware = pkgs.lib.mkOption {
default = false;
type = pkgs.lib.types.bool;
@ -18,9 +18,9 @@
###### implementation
config = pkgs.lib.mkIf config.networking.enableRT73Firmware {
hardware.firmware = [ pkgs.rt73fw ];
};
}

6
modules/hardware/network/rtl8192c.nix

@ -5,7 +5,7 @@
###### interface
options = {
networking.enableRTL8192cFirmware = pkgs.lib.mkOption {
default = false;
type = pkgs.lib.types.bool;
@ -18,9 +18,9 @@
###### implementation
config = pkgs.lib.mkIf config.networking.enableRTL8192cFirmware {
hardware.firmware = [ pkgs.rtl8192cfw ];
};
}

2
modules/hardware/video/encoder/wis-go7007.nix

@ -10,6 +10,6 @@ in
environment.systemPackages = [wis_go7007];
hardware.firmware = ["${wis_go7007}/firmware"];
services.udev.packages = [wis_go7007];
}

6
modules/installer/cd-dvd/installation-cd-base.nix

@ -25,7 +25,7 @@ let
nixpkgsTarball = makeTarball "nixpkgs.tar.bz2" (cleanSource pkgs.path);
includeSources = true;
in
{
@ -40,9 +40,9 @@ in
# ISO naming.
isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixosVersion}-${pkgs.stdenv.system}.iso";
isoImage.volumeID = "NIXOS_INSTALL_CD_${config.system.nixosVersion}";
boot.postBootCommands =
''
export PATH=${pkgs.gnutar}/bin:${pkgs.bzip2}/bin:$PATH

18
modules/installer/cd-dvd/iso-image.nix

@ -85,7 +85,7 @@ let
# The configuration file for Grub.
grubCfg =
grubCfg =
''
set default=${builtins.toString config.boot.loader.grub.default}
set timeout=${builtins.toString config.boot.loader.grub.timeout}
@ -104,12 +104,12 @@ let
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
fi
fi
${config.boot.loader.grub.extraEntries}
'';
in
{
@ -154,13 +154,13 @@ in
# We need squashfs in the initrd to mount the compressed Nix store,
# and aufs to make the root filesystem appear writable.
boot.extraModulePackages =
optional
(! ( config.boot.kernelPackages.kernel.features ? aufs || config.boot.kernelPackages.kernel.features ? aufs2_1 ) )
optional
(! ( config.boot.kernelPackages.kernel.features ? aufs || config.boot.kernelPackages.kernel.features ? aufs2_1 ) )
config.boot.kernelPackages.aufs2
++ optional
( config.boot.kernelPackages.kernel.features ? aufs2_1 )
config.boot.kernelPackages.aufs2_1;
boot.initrd.availableKernelModules = [ "aufs" "squashfs" "iso9660" ];
boot.initrd.kernelModules = [ "loop" ];
@ -184,7 +184,7 @@ in
# Closures to be copied to the Nix store on the CD, namely the init
# script and the top-level system configuration directory.
isoImage.storeContents =
[ config.system.build.toplevel ] ++
[ config.system.build.toplevel ] ++
optional config.isoImage.includeSystemBuildDependencies
config.system.build.toplevel.drvPath;
@ -237,13 +237,13 @@ in
chainloader +1
}
'';
boot.loader.grub.timeout = 10;
# Create the ISO image.
system.build.isoImage = import ../../../lib/make-iso9660-image.nix {
inherit (pkgs) stdenv perl cdrkit pathsFromGraph;
inherit (config.isoImage) isoName compressImage volumeID contents;
bootable = true;

20
modules/installer/cd-dvd/live-dvd.nix

@ -23,32 +23,32 @@
pkgs.patch
pkgs.which
pkgs.diffutils
pkgs.file
pkgs.file
pkgs.irssi
pkgs.mcabber
pkgs.mutt
pkgs.mutt
pkgs.emacs
pkgs.vimHugeX
pkgs.bvi
pkgs.bvi
pkgs.ddrescue
pkgs.cdrkit
pkgs.cdrkit
pkgs.btrfsProgs
pkgs.xfsprogs
pkgs.jfsutils
pkgs.jfsrec
pkgs.ntfs3g
pkgs.ntfs3g
pkgs.subversion16
pkgs.monotone
pkgs.git
pkgs.darcs
pkgs.mercurial
pkgs.bazaar
pkgs.cvs
pkgs.cvs
pkgs.pciutils
pkgs.hddtemp
pkgs.sdparm
pkgs.hdparm
pkgs.usbutils
pkgs.usbutils
pkgs.openssh
pkgs.lftp
pkgs.w3m
@ -64,9 +64,9 @@
pkgs.unzip
pkgs.lzma
pkgs.cabextract
pkgs.cpio
pkgs.cpio
pkgs.lsof
pkgs.ltrace
pkgs.ltrace
pkgs.perl
pkgs.python
pkgs.ruby
@ -74,5 +74,5 @@
pkgs.clisp
pkgs.tcl
];
}

8
modules/installer/cd-dvd/system-tarball-fuloong2f.nix

@ -24,7 +24,7 @@ let
nixpkgs.config.platform = pkgs.platforms.fuloong2f_n32;
}
'';
pkgs2storeContents = l : map (x: { object = x; symlink = "none"; }) l;
@ -51,7 +51,7 @@ let
platform = pkgs.platforms.fuloong2f_n32;
}
'';
in
{
@ -104,7 +104,7 @@ in
pkgs.zip
pkgs.xz
pkgs.dar # disk archiver
# Some editors.
pkgs.nvi
pkgs.bvi # binary editor
@ -134,7 +134,7 @@ in
# Some more help text.
services.mingetty.helpLine =
''
Log in as "root" with an empty password. ${
if config.services.xserver.enable then
"Type `start xserver' to start\nthe graphical user interface."

12
modules/installer/cd-dvd/system-tarball-pc.nix

@ -40,21 +40,21 @@ let
# Example configuration for booting PXE.
allow booting;
allow bootp;
# Adapt this to your network configuration.
option domain-name "local";
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option domain-name-servers 192.168.1.1;
option routers 192.168.1.1;
# PXE-specific configuration directives...
# Some BIOS don't accept slashes for paths inside the tftp servers,
# and will report Access Violation if they see slashes.
filename "pxelinux.0";
# For the TFTP and NFS root server. Set the IP of your server.
next-server 192.168.1.34;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.50 192.168.1.55;
}
@ -86,7 +86,7 @@ let
You can test qemu pxe boot without having a DHCP server adapted, but having nfsroot,
like this:
qemu-system-x86_64 -tftp /home/pcroot/boot -net nic -net user,bootfile=pxelinux.0 -boot n
qemu-system-x86_64 -tftp /home/pcroot/boot -net nic -net user,bootfile=pxelinux.0 -boot n
I don't know how to use NFS through the qemu '-net user' though.
@ -114,7 +114,7 @@ in
{
require = [
./system-tarball.nix
# Profiles of this basic installation.
../../profiles/base.nix
../../profiles/installation-device.nix
@ -150,7 +150,7 @@ in
target = "/boot/memtest";
}
];
# Allow sshd to be started manually through "start sshd". It should
# not be started by default on the installation CD because the
# default root password is empty.

6
modules/installer/cd-dvd/system-tarball-sheevaplug.nix

@ -25,7 +25,7 @@ let
# services.openssh.enable = true;
}
'';
pkgs2storeContents = l : map (x: { object = x; symlink = "none"; }) l;
@ -45,7 +45,7 @@ let
init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams}
'';
in
{
@ -91,7 +91,7 @@ in
pkgs.zip
pkgs.xz
pkgs.dar # disk archiver
# Some editors.
pkgs.nvi
pkgs.bvi # binary editor

2
modules/installer/cd-dvd/system-tarball.nix

@ -68,7 +68,7 @@ in
# Create the tarball
system.build.tarball = import ../../../lib/make-system-tarball.nix {
inherit (pkgs) stdenv perl xz pathsFromGraph;
inherit (config.tarball) contents storeContents;
};

10
modules/installer/grub/grub.nix

@ -16,7 +16,7 @@ let
extraConfig extraEntries extraEntriesBeforeNixOS extraPerEntryConfig
splashImage configurationLimit version default timeout;
};
in
{
@ -146,7 +146,7 @@ in
timeout = mkOption {
default = 5;
description = ''
Timeout (in seconds) until GRUB boots the default menu item.
Timeout (in seconds) until GRUB boots the default menu item.
'';
};
@ -160,12 +160,12 @@ in
};
};
###### implementation
config = mkIf config.boot.loader.grub.enable {
system.build.menuBuilder = grubMenuBuilder;
# Common attribute for boot loaders so only one of them can be
@ -178,5 +178,5 @@ in
system.build.grub = grub;
};
}

8
modules/installer/init-script/init-script.nix

@ -10,7 +10,7 @@ let
inherit (pkgs) bash;
path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep];
};
in
{
@ -37,15 +37,15 @@ in
};
};
###### implementation
config = {
system.build.initScriptBuilder =
if config.boot.loader.initScript.enable then initScriptBuilder else "";
};
}

2
modules/installer/tools/nixos-checkout.nix

@ -32,7 +32,7 @@ let
${pkgs.subversion}/bin/svn co https://svn.nixos.org/repos/nix/nixpkgs/trunk nixpkgs
'';
};
in
{

46
modules/installer/tools/nixos-deploy-network/deploy.nix

@ -6,16 +6,16 @@
let
pkgs = import nixpkgs {};
inherit (builtins) attrNames getAttr listToAttrs;
inherit (pkgs.lib) concatMapStrings zipAttrs;
networks = map (networkExpr: import networkExpr) networkExprs;
network = zipAttrs networks;
generateRollbackSucceededPhase = network: configs:
concatMapStrings (configurationName:
concatMapStrings (configurationName:
let
config = getAttr configurationName configs;
in
@ -24,15 +24,15 @@ let
then
ssh $NIX_SSHOPTS ${getAttr targetProperty (config.deployment)} nix-env -p /nix/var/nix/profiles/system --rollback
ssh $NIX_SSHOPTS ${getAttr targetProperty (config.deployment)} /nix/var/nix/profiles/system/bin/switch-to-configuration switch
rollback=$((rollback + 1))
fi
''
) (attrNames network)
) (attrNames network)
;
generateDistributionPhase = network: configs:
concatMapStrings (configurationName:
concatMapStrings (configurationName:
let
config = getAttr configurationName configs;
in
@ -42,28 +42,28 @@ let
''
) (attrNames network)
;
generateActivationPhase = network: configs:
concatMapStrings (configurationName:
concatMapStrings (configurationName:
let
config = getAttr configurationName configs;
in
''
echo "=== activating system configuration on ${getAttr targetProperty (config.deployment)} ==="
ssh $NIX_SSHOPTS ${getAttr targetProperty (config.deployment)} nix-env -p /nix/var/nix/profiles/system --set ${config.system.build.toplevel} ||
ssh $NIX_SSHOPTS ${getAttr targetProperty (config.deployment)} nix-env -p /nix/var/nix/profiles/system --set ${config.system.build.toplevel} ||
(ssh $NIX_SSHOPTS ${getAttr targetProperty (config.deployment)} nix-env -p /nix/var/nix/profiles/system --rollback; rollbackSucceeded)
ssh $NIX_SSHOPTS ${getAttr targetProperty (config.deployment)} /nix/var/nix/profiles/system/bin/switch-to-configuration switch ||
( ssh $NIX_SSHOPTS ${getAttr targetProperty (config.deployment)} nix-env -p /nix/var/nix/profiles/system --rollback
ssh $NIX_SSHOPTS ${getAttr targetProperty (config.deployment)} /nix/var/nix/profiles/system/bin/switch-to-configuration switch
rollbackSucceeded
)
succeeded=$((succeeded + 1))
''
) (attrNames network)
;
evaluateMachines = network:
listToAttrs (map (configurationName:
let
@ -93,27 +93,27 @@ pkgs.stdenv.mkDerivation {
# This script has a zillion dependencies and is trivial to build, so
# we don't want to build it remotely.
preferLocalBuild = true;
buildCommand =
buildCommand =
''
ensureDir $out/bin
cat > $out/bin/deploy-systems << "EOF"
#! ${pkgs.stdenv.shell} -e
rollbackSucceeded()