diff --git a/doc/manual/default.nix b/doc/manual/default.nix index c46e89d0fa14..4f1e555583d2 100644 --- a/doc/manual/default.nix +++ b/doc/manual/default.nix @@ -41,7 +41,7 @@ let ./manual.xml cp ${./style.css} $out/style.css ensureDir $out/nix-support - echo "doc manual $out" >> $out/nix-support/hydra-build-products + echo "doc manual $out manual.html" >> $out/nix-support/hydra-build-products ''; }; diff --git a/etc/default.nix b/etc/default.nix index 8579b334e672..b396437c17c4 100644 --- a/etc/default.nix +++ b/etc/default.nix @@ -191,6 +191,7 @@ let "chsh" "xlock" "cups" + "ftp" "common" "common-console" # shared stuff for interactive local sessions ] diff --git a/etc/pam.d/ftp b/etc/pam.d/ftp new file mode 100644 index 000000000000..50f3cc5ce607 --- /dev/null +++ b/etc/pam.d/ftp @@ -0,0 +1,4 @@ +auth include common +account include common +password include common +session include common diff --git a/installer/cd-dvd/live-dvd-X-medium.nix b/installer/cd-dvd/live-dvd-X-medium.nix index ec0089ded56e..db57921b4c53 100644 --- a/installer/cd-dvd/live-dvd-X-medium.nix +++ b/installer/cd-dvd/live-dvd-X-medium.nix @@ -22,7 +22,7 @@ let in (isoFun (rec { inherit platform; - lib = (import ../pkgs/lib); + lib = (import ../../pkgs/lib); networkNixpkgs = ""; manualEnabled = true; @@ -171,40 +171,40 @@ in configList = configuration : [ { suffix = "X-vesa"; - configuration = (configuration // + configuration = args: ((configuration args) // { - boot=configuration.boot // {configurationName = "X with vesa";}; - services = configuration.services // { + boot=(configuration args).boot // {configurationName = "X with vesa";}; + services = (configuration args).services // { xserver = xConfiguration // {videoDriver = "vesa";}; }; }); } { suffix = "X-Intel"; - configuration = (configuration // + configuration = args: ((configuration args) // { - boot=configuration.boot // {configurationName = "X with Intel graphic card";}; - services = configuration.services // { + boot=(configuration args).boot // {configurationName = "X with Intel graphic card";}; + services = (configuration args).services // { xserver = xConfiguration // {videoDriver = "intel"; driSupport = true;}; }; }); } { suffix = "X-ATI"; - configuration = (configuration // + configuration = args: ((configuration args) // { - boot=configuration.boot // {configurationName = "X with ATI graphic card";}; - services = configuration.services // { + boot=(configuration args).boot // {configurationName = "X with ATI graphic card";}; + services = (configuration args).services // { xserver = xConfiguration // {videoDriver = "ati"; driSupport = true;}; }; }); } { suffix = "X-NVIDIA"; - configuration = (configuration // + configuration = args: ((configuration args) // { - boot=configuration.boot // {configurationName = "X with NVIDIA graphic card";}; - services = configuration.services // { + boot=(configuration args).boot // {configurationName = "X with NVIDIA graphic card";}; + services = (configuration args).services // { xserver = xConfiguration // {videoDriver = "nvidia"; driSupport = true;}; }; }); diff --git a/installer/cd-dvd/live-dvd-X-no-soft.nix b/installer/cd-dvd/live-dvd-X-no-soft.nix index 7111107b6757..62ebf683d098 100644 --- a/installer/cd-dvd/live-dvd-X-no-soft.nix +++ b/installer/cd-dvd/live-dvd-X-no-soft.nix @@ -18,7 +18,6 @@ let windowManager = "twm"; tty = "9"; }; - pkgs in (isoFun { @@ -80,40 +79,40 @@ in configList = configuration : [ { suffix = "X-vesa"; - configuration = (configuration // + configuration = args: ((configuration args) // { - boot=configuration.boot // {configurationName = "X with vesa";}; - services = configuration.services // { + boot=(configuration args).boot // {configurationName = "X with vesa";}; + services = (configuration args).services // { xserver = xConfiguration // {videoDriver = "vesa";}; }; }); } { suffix = "X-Intel"; - configuration = (configuration // + configuration = args: ((configuration args) // { - boot=configuration.boot // {configurationName = "X with Intel graphic card";}; - services = configuration.services // { + boot=(configuration args).boot // {configurationName = "X with Intel graphic card";}; + services = (configuration args).services // { xserver = xConfiguration // {videoDriver = "intel"; driSupport = true;}; }; }); } { suffix = "X-ATI"; - configuration = (configuration // + configuration = args: ((configuration args) // { - boot=configuration.boot // {configurationName = "X with ATI graphic card";}; - services = configuration.services // { + boot=(configuration args).boot // {configurationName = "X with ATI graphic card";}; + services = (configuration args).services // { xserver = xConfiguration // {videoDriver = "ati"; driSupport = true;}; }; }); } { suffix = "X-NVIDIA"; - configuration = (configuration // + configuration = args: ((configuration args) // { - boot=configuration.boot // {configurationName = "X with NVIDIA graphic card";}; - services = configuration.services // { + boot=(configuration args).boot // {configurationName = "X with NVIDIA graphic card";}; + services = (configuration args).services // { xserver = xConfiguration // {videoDriver = "nvidia"; driSupport = true;}; }; }); diff --git a/installer/cd-dvd/live-dvd-X.nix b/installer/cd-dvd/live-dvd-X.nix index e9b3c2df2ebb..c98b398a9af1 100644 --- a/installer/cd-dvd/live-dvd-X.nix +++ b/installer/cd-dvd/live-dvd-X.nix @@ -20,9 +20,9 @@ let }; in -(isoFun { +(isoFun (rec { inherit platform; - lib = (import ../pkgs/lib); + lib = (import ../../pkgs/lib); networkNixpkgs = ""; manualEnabled = true; @@ -182,43 +182,43 @@ in configList = configuration : [ { suffix = "X-vesa"; - configuration = (configuration // + configuration = args: ((configuration args) // { - boot=configuration.boot // {configurationName = "X with vesa";}; - services = configuration.services // { + boot=(configuration args).boot // {configurationName = "X with vesa";}; + services = (configuration args).services // { xserver = xConfiguration // {videoDriver = "vesa";}; }; }); } { suffix = "X-Intel"; - configuration = (configuration // + configuration = args: ((configuration args) // { - boot=configuration.boot // {configurationName = "X with Intel graphic card";}; - services = configuration.services // { + boot=(configuration args).boot // {configurationName = "X with Intel graphic card";}; + services = (configuration args).services // { xserver = xConfiguration // {videoDriver = "intel"; driSupport = true;}; }; }); } { suffix = "X-ATI"; - configuration = (configuration // + configuration = args: ((configuration args) // { - boot=configuration.boot // {configurationName = "X with ATI graphic card";}; - services = configuration.services // { + boot=(configuration args).boot // {configurationName = "X with ATI graphic card";}; + services = (configuration args).services // { xserver = xConfiguration // {videoDriver = "ati"; driSupport = true;}; }; }); } { suffix = "X-NVIDIA"; - configuration = (configuration // + configuration = args: ((configuration args) // { - boot=configuration.boot // {configurationName = "X with NVIDIA graphic card";}; - services = configuration.services // { + boot=(configuration args).boot // {configurationName = "X with NVIDIA graphic card";}; + services = (configuration args).services // { xserver = xConfiguration // {videoDriver = "nvidia"; driSupport = true;}; }; }); } ]; -}).rescueCD +})).rescueCD diff --git a/installer/cd-dvd/remote-install-scripts/install-script.sh b/installer/cd-dvd/remote-install-scripts/install-script.sh index fbacf6ff6a58..574cdb40a22e 100755 --- a/installer/cd-dvd/remote-install-scripts/install-script.sh +++ b/installer/cd-dvd/remote-install-scripts/install-script.sh @@ -14,7 +14,7 @@ mkdir -p /mnt/etc/nixos cat > /mnt/etc/nixos/configuration.nix < report nix-build -o socat /etc/nixos/nixpkgs -A socat || { echo "Failed to build socat" >&2 ; exit 2; }; -nix-build -o qemu /etc/nixos/nixpkgs -A qemu || { echo "Failed to build qemu" >&2 ; exit 2; }; +nix-build -o qemu /etc/nixos/nixpkgs -A ${QEMU_PACKAGE:-qemu} || { echo "Failed to build qemu" >&2 ; exit 2; }; echo "reboot" | ./socat/bin/socat tcp-listen:4424 stdio >> report & diff --git a/installer/cd-dvd/rescue-cd-configurable.nix b/installer/cd-dvd/rescue-cd-configurable.nix index e727d2d1f2db..f021c19b63bc 100644 --- a/installer/cd-dvd/rescue-cd-configurable.nix +++ b/installer/cd-dvd/rescue-cd-configurable.nix @@ -137,7 +137,7 @@ rec { nixpkgsRel = "nixpkgs" + (if networkNixpkgs != "" then "-" + networkNixpkgs else ""); - configuration = pkgs: final_configuration: let preConfiguration ={ + configuration = {pkgs, config, ...}: let preConfiguration ={ boot = { isLiveCD = true; # The label used to identify the installation CD. @@ -164,8 +164,8 @@ rec { udev = { addFirmware = [] - ++ (pkgs.lib.optional intel3945FWEnable pkgs.iwlwifi3945ucode) - ++ (pkgs.lib.optional intel4965FWEnable pkgs.iwlwifi4965ucode) + #++ (pkgs.lib.optional intel3945FWEnable pkgs.iwlwifi3945ucode) + #++ (pkgs.lib.optional intel4965FWEnable pkgs.iwlwifi4965ucode) ; }; diff --git a/release.nix b/release.nix index d291e21b8dd3..24b70478748b 100644 --- a/release.nix +++ b/release.nix @@ -14,11 +14,15 @@ let releaseTools.makeSourceTarball { name = "nixos-tarball"; + + version = builtins.readFile ./VERSION; + src = nixosSrc; + inherit officialRelease; distPhase = '' - releaseName=nixos-$(cat $src/VERSION)$VERSION_SUFFIX + releaseName=nixos-$VERSION ensureDir "$out/tarballs" mkdir ../$releaseName cp -prd . ../$releaseName @@ -50,16 +54,18 @@ let let + version = builtins.readFile ./VERSION + (if officialRelease then "" else "pre${toString nixosSrc.rev}"); + iso = (import "${nixosSrc.path}/installer/cd-dvd/rescue-cd.nix" { platform = system; compressImage = true; nixpkgsPath = nixpkgs.path; - relName = "nixos-${builtins.readFile ./VERSION}${if !officialRelease then "pre${toString nixosSrc.rev}" else ""}"; + relName = "nixos-${version}"; }).rescueCD; in # Declare the ISO as a build product so that it shows up in Hydra. - runCommand "nixos-iso" + runCommand "nixos-iso-${version}" { meta = { description = "NixOS installation CD ISO image for ${system}"; }; diff --git a/upstart-jobs/nix-daemon.nix b/upstart-jobs/nix-daemon.nix index 553c1c935336..939539a42f92 100644 --- a/upstart-jobs/nix-daemon.nix +++ b/upstart-jobs/nix-daemon.nix @@ -8,9 +8,9 @@ stop on shutdown respawn script - export PATH=${if config.nix.distributedBuilds then "${pkgs.openssh}/bin:" else ""}${pkgs.openssl}/bin:${nix}/bin:$PATH + export PATH=${if config.nix.distributedBuilds then "${pkgs.openssh}/bin:${pkgs.gzip}/bin:" else ""}${pkgs.openssl}/bin:${nix}/bin:$PATH ${nixEnvVars} - exec ${nix}/bin/nix-worker --daemon > /dev/null 2>&1 + exec nice -10 ${nix}/bin/nix-worker --daemon > /dev/null 2>&1 end script "; diff --git a/upstart-jobs/nix.nix b/upstart-jobs/nix.nix index c46b721a2a02..8b43036485ea 100644 --- a/upstart-jobs/nix.nix +++ b/upstart-jobs/nix.nix @@ -190,17 +190,23 @@ in # other paths in the store, we need the closure of /bin/sh # in `build-chroot-dirs' - otherwise any builder that uses # /bin/sh won't work. - refs = pkgs.writeReferencesToFile binsh; + binshDeps = pkgs.writeReferencesToFile binsh; + + # Likewise, if chroots are turned on, we need Nix's own + # closure in the chroot. Otherwise nix-channel and nix-env + # won't work because the dependencies of its builders (like + # coreutils and Perl) aren't visible. Sigh. + nixDeps = pkgs.writeReferencesToFile config.environment.nix; in - pkgs.runCommand "nix.conf" {} '' - binshDeps=$(for i in $(cat ${refs}); do if test -d $i; then echo $i; fi; done) + pkgs.runCommand "nix.conf" {extraOptions = config.nix.extraOptions; } '' + extraPaths=$(for i in $(cat ${binshDeps} ${nixDeps}); do if test -d $i; then echo $i; fi; done) cat > $out < /etc/vsftpd.conf <