diff options
author | Peter Simons <simons@cryp.to> | 2011-09-14 18:20:50 +0000 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2011-09-14 18:20:50 +0000 |
commit | eb6e1310b8774f3aed4c5675d09708f0df6199d3 (patch) | |
tree | 3297542b3cda78d38731abb65837f4553cd377a9 /modules/installer | |
parent | f5e8d35f8e76755febf97ca8f62b0700a8b6d20a (diff) | |
download | nixpkgs-eb6e1310b8774f3aed4c5675d09708f0df6199d3.tar nixpkgs-eb6e1310b8774f3aed4c5675d09708f0df6199d3.tar.gz nixpkgs-eb6e1310b8774f3aed4c5675d09708f0df6199d3.tar.bz2 nixpkgs-eb6e1310b8774f3aed4c5675d09708f0df6199d3.tar.lz nixpkgs-eb6e1310b8774f3aed4c5675d09708f0df6199d3.tar.xz nixpkgs-eb6e1310b8774f3aed4c5675d09708f0df6199d3.tar.zst nixpkgs-eb6e1310b8774f3aed4c5675d09708f0df6199d3.zip |
strip trailing whitespace; no functional change
svn path=/nixos/trunk/; revision=29285
Diffstat (limited to 'modules/installer')
-rw-r--r-- | modules/installer/cd-dvd/installation-cd-base.nix | 6 | ||||
-rw-r--r-- | modules/installer/cd-dvd/iso-image.nix | 18 | ||||
-rw-r--r-- | modules/installer/cd-dvd/live-dvd.nix | 20 | ||||
-rw-r--r-- | modules/installer/cd-dvd/system-tarball-fuloong2f.nix | 8 | ||||
-rw-r--r-- | modules/installer/cd-dvd/system-tarball-pc.nix | 12 | ||||
-rw-r--r-- | modules/installer/cd-dvd/system-tarball-sheevaplug.nix | 6 | ||||
-rw-r--r-- | modules/installer/cd-dvd/system-tarball.nix | 2 | ||||
-rw-r--r-- | modules/installer/grub/grub.nix | 10 | ||||
-rw-r--r-- | modules/installer/init-script/init-script.nix | 8 | ||||
-rw-r--r-- | modules/installer/tools/nixos-checkout.nix | 2 | ||||
-rw-r--r-- | modules/installer/tools/nixos-deploy-network/deploy.nix | 46 |
11 files changed, 69 insertions, 69 deletions
diff --git a/modules/installer/cd-dvd/installation-cd-base.nix b/modules/installer/cd-dvd/installation-cd-base.nix index a011861ea36..564916d099f 100644 --- a/modules/installer/cd-dvd/installation-cd-base.nix +++ b/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 diff --git a/modules/installer/cd-dvd/iso-image.nix b/modules/installer/cd-dvd/iso-image.nix index 6e1994cffc7..d565435ffd2 100644 --- a/modules/installer/cd-dvd/iso-image.nix +++ b/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; diff --git a/modules/installer/cd-dvd/live-dvd.nix b/modules/installer/cd-dvd/live-dvd.nix index 4857900389c..c5a89a3173e 100644 --- a/modules/installer/cd-dvd/live-dvd.nix +++ b/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 ]; - + } diff --git a/modules/installer/cd-dvd/system-tarball-fuloong2f.nix b/modules/installer/cd-dvd/system-tarball-fuloong2f.nix index 7ece0716df6..a0b92369f65 100644 --- a/modules/installer/cd-dvd/system-tarball-fuloong2f.nix +++ b/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." diff --git a/modules/installer/cd-dvd/system-tarball-pc.nix b/modules/installer/cd-dvd/system-tarball-pc.nix index 9f81695452c..8b916b04fd9 100644 --- a/modules/installer/cd-dvd/system-tarball-pc.nix +++ b/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. diff --git a/modules/installer/cd-dvd/system-tarball-sheevaplug.nix b/modules/installer/cd-dvd/system-tarball-sheevaplug.nix index f8b6b632ea7..c5f6de4c221 100644 --- a/modules/installer/cd-dvd/system-tarball-sheevaplug.nix +++ b/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 diff --git a/modules/installer/cd-dvd/system-tarball.nix b/modules/installer/cd-dvd/system-tarball.nix index a829b85b59f..daffb94bc53 100644 --- a/modules/installer/cd-dvd/system-tarball.nix +++ b/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; }; diff --git a/modules/installer/grub/grub.nix b/modules/installer/grub/grub.nix index 50ae0ddb596..eaafec78653 100644 --- a/modules/installer/grub/grub.nix +++ b/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; }; - + } diff --git a/modules/installer/init-script/init-script.nix b/modules/installer/init-script/init-script.nix index 9eeadca109f..edf7d23d2a7 100644 --- a/modules/installer/init-script/init-script.nix +++ b/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 ""; }; - + } diff --git a/modules/installer/tools/nixos-checkout.nix b/modules/installer/tools/nixos-checkout.nix index 2d7304ea68d..74a22bc84f5 100644 --- a/modules/installer/tools/nixos-checkout.nix +++ b/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 { diff --git a/modules/installer/tools/nixos-deploy-network/deploy.nix b/modules/installer/tools/nixos-deploy-network/deploy.nix index 5eda39269ca..7ece202a990 100644 --- a/modules/installer/tools/nixos-deploy-network/deploy.nix +++ b/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() { rollback=0 ${generateRollbackSucceededPhase network configs} } - + # Distribution phase - + ${generateDistributionPhase network configs} - + # Activation phase - + succeeded=0 - + ${generateActivationPhase network configs} EOF chmod +x $out/bin/deploy-systems |