From 6c2622abe73e63497156d958e701f76573c28169 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 24 Feb 2009 15:07:15 +0000 Subject: [PATCH 01/12] * Add support for the Cirrus driver. This is useful in QEMU/KVM because it emulates a Cirrus card. svn path=/nixos/trunk/; revision=14227 --- upstart-jobs/xserver.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/upstart-jobs/xserver.nix b/upstart-jobs/xserver.nix index c889c6427a94..1a84add6f054 100644 --- a/upstart-jobs/xserver.nix +++ b/upstart-jobs/xserver.nix @@ -23,6 +23,7 @@ let nv = { modules = [xorg.xf86videonv]; }; ati = { modules = [xorg.xf86videoati]; }; via = { modules = [xorg.xf86videovia]; }; + cirrus = { modules = [xorg.xf86videocirrus]; }; }; # Get a bunch of user settings. From 9e29c72bd2adf992980acb53ad851294c5a485f8 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Tue, 24 Feb 2009 16:19:29 +0000 Subject: [PATCH 02/12] Automated install is once more succesful svn path=/nixos/trunk/; revision=14229 --- installer/cd-dvd/remote-install-scripts/install-script.sh | 2 +- installer/cd-dvd/remote-install-scripts/install-test.sh | 2 +- installer/cd-dvd/rescue-cd-configurable.nix | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) 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) ; }; From d1f57d6e1b76882fa8051f2c544b56294211bf71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 24 Feb 2009 19:17:25 +0000 Subject: [PATCH 03/12] Convert `portmap' Upstart job to the "new" style. svn path=/nixos/trunk/; revision=14232 --- system/options.nix | 13 +----- upstart-jobs/default.nix | 6 --- upstart-jobs/portmap.nix | 93 +++++++++++++++++++++++++++------------- 3 files changed, 64 insertions(+), 48 deletions(-) diff --git a/system/options.nix b/system/options.nix index a2952b4a3259..912a6de6b4b5 100644 --- a/system/options.nix +++ b/system/options.nix @@ -967,18 +967,6 @@ in }; - portmap = { - - enable = mkOption { - default = false; - description = '' - Whether to enable `portmap', an ONC RPC directory service - notably used by NFS and NIS, and which can be queried - using the rpcinfo(1) command. - ''; - }; - }; - avahi = { enable = mkOption { @@ -3081,5 +3069,6 @@ root ALL=(ALL) SETENV: ALL (import ../upstart-jobs/rogue.nix) (import ../upstart-jobs/guest-users.nix) (import ../upstart-jobs/pulseaudio.nix) + (import ../upstart-jobs/portmap.nix) ]; } diff --git a/upstart-jobs/default.nix b/upstart-jobs/default.nix index f804240a50bb..fa92cd57c8f3 100644 --- a/upstart-jobs/default.nix +++ b/upstart-jobs/default.nix @@ -220,12 +220,6 @@ let servers = config.services.ntp.servers; }) - # portmap daemon. - ++ optional config.services.portmap.enable - (import ../upstart-jobs/portmap.nix { - inherit (pkgs) makePortmap; - }) - # Avahi daemon. ++ optional config.services.avahi.enable (import ../upstart-jobs/avahi-daemon.nix { diff --git a/upstart-jobs/portmap.nix b/upstart-jobs/portmap.nix index 18ff06dc1af4..9cb96b08b0de 100644 --- a/upstart-jobs/portmap.nix +++ b/upstart-jobs/portmap.nix @@ -1,35 +1,68 @@ -{ makePortmap }: +{pkgs, config, ...}: + +###### interface +let + inherit (pkgs.lib) mkOption mkIf; + inherit (pkgs) makePortmap; + + uid = (import ../system/ids.nix).uids.portmap; + gid = (import ../system/ids.nix).gids.portmap; + + options = { + services = { + portmap = { + + enable = mkOption { + default = false; + description = '' + Whether to enable `portmap', an ONC RPC directory service + notably used by NFS and NIS, and which can be queried + using the rpcinfo(1) command. + ''; + }; + + }; + }; + }; -let uid = (import ../system/ids.nix).uids.portmap; - gid = (import ../system/ids.nix).gids.portmap; in -{ - name = "portmap"; - - users = [ - { name = "portmap"; - inherit uid; - description = "portmap daemon user"; - home = "/var/empty"; - } + +###### implementation +mkIf config.services.portmap.enable { + require = [ + options ]; - - groups = [ - { name = "portmap"; - inherit gid; - } - ]; - - job = - let portmap = makePortmap { daemonUID = uid; daemonGID = gid; }; - in - '' -description "ONC RPC portmap" - -start on network-interfaces/started -stop on network-interfaces/stop - -respawn ${portmap}/sbin/portmap -''; + users = { + extraUsers = [ + { name = "portmap"; + inherit uid; + description = "portmap daemon user"; + home = "/var/empty"; + } + ]; + + extraGroups = [ + { name = "portmap"; + inherit gid; + } + ]; + }; + + services = { + extraJobs = [{ + name = "portmap"; + + job = + let portmap = makePortmap { daemonUID = uid; daemonGID = gid; }; + in '' + description "ONC RPC portmap" + + start on network-interfaces/started + stop on network-interfaces/stop + + respawn ${portmap}/sbin/portmap + ''; + }]; + }; } From d01a495de4a37c56e8f6d9f69dd9eee61a54275a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 24 Feb 2009 20:41:58 +0000 Subject: [PATCH 04/12] portmap: Add options. svn path=/nixos/trunk/; revision=14233 --- upstart-jobs/portmap.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/upstart-jobs/portmap.nix b/upstart-jobs/portmap.nix index 9cb96b08b0de..1a8bce11904c 100644 --- a/upstart-jobs/portmap.nix +++ b/upstart-jobs/portmap.nix @@ -21,6 +21,20 @@ let ''; }; + verbose = mkOption { + default = false; + description = '' + Whether to enable verbose output. + ''; + }; + + chroot = mkOption { + default = "/var/empty"; + description = '' + If non-empty, a path to change root to. + ''; + }; + }; }; }; @@ -61,7 +75,11 @@ mkIf config.services.portmap.enable { start on network-interfaces/started stop on network-interfaces/stop - respawn ${portmap}/sbin/portmap + respawn ${portmap}/sbin/portmap \ + ${if config.services.portmap.chroot == "" + then "" + else "-t \"${config.services.portmap.chroot}\""} \ + ${if config.services.portmap.verbose then "-v" else ""} ''; }]; }; From f767f1bea87ced6d507a9e0694d419d07dad9c11 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Wed, 25 Feb 2009 21:15:35 +0000 Subject: [PATCH 05/12] Updating LiveDVD with X expressions svn path=/nixos/trunk/; revision=14251 --- installer/cd-dvd/live-dvd-X-medium.nix | 26 ++++++++++----------- installer/cd-dvd/live-dvd-X-no-soft.nix | 25 ++++++++++----------- installer/cd-dvd/live-dvd-X.nix | 30 ++++++++++++------------- 3 files changed, 40 insertions(+), 41 deletions(-) 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 From f5b2ecdc1375b995236ecd1c4b52269ad108be02 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 27 Feb 2009 12:03:03 +0000 Subject: [PATCH 06/12] * Make nix-channel and nix-env work when chroots are enabled. svn path=/nixos/trunk/; revision=14271 --- etc/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/etc/default.nix b/etc/default.nix index 88d4d39e21ec..6ecfedf78979 100644 --- a/etc/default.nix +++ b/etc/default.nix @@ -132,16 +132,22 @@ import ../helpers/make-etc.nix { # 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) + extraPaths=$(for i in $(cat ${binshDeps} ${nixDeps}); do if test -d $i; then echo $i; fi; done) cat > $out < Date: Fri, 27 Feb 2009 13:40:31 +0000 Subject: [PATCH 07/12] * Need gzip in the Nix daemon's PATH. Forgot to commit this. svn path=/nixos/trunk/; revision=14274 --- upstart-jobs/nix-daemon.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 "; From 51078ac5b7a5aa95e0e0ea56d590299e81e9c506 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 27 Feb 2009 14:08:38 +0000 Subject: [PATCH 08/12] * Support special characters in config.nix.extraOptions. svn path=/nixos/trunk/; revision=14278 --- etc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/default.nix b/etc/default.nix index 6ecfedf78979..e2fc88744ce5 100644 --- a/etc/default.nix +++ b/etc/default.nix @@ -140,7 +140,7 @@ import ../helpers/make-etc.nix { # coreutils and Perl) aren't visible. Sigh. nixDeps = pkgs.writeReferencesToFile config.environment.nix; in - pkgs.runCommand "nix.conf" {} '' + 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 < Date: Sat, 28 Feb 2009 20:01:49 +0000 Subject: [PATCH 09/12] Fixing vsftpd without anonymous users, adding localUsers, and creating chroot path. svn path=/nixos/trunk/; revision=14286 --- system/options.nix | 7 +++++++ upstart-jobs/default.nix | 2 +- upstart-jobs/vsftpd.nix | 17 ++++++++++++++++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/system/options.nix b/system/options.nix index 912a6de6b4b5..a8ddd3996038 100644 --- a/system/options.nix +++ b/system/options.nix @@ -1847,6 +1847,13 @@ in "; }; + localUsers = mkOption { + default = false; + description = " + Whether to enable FTP for the local users. + "; + }; + writeEnable = mkOption { default = false; description = " diff --git a/upstart-jobs/default.nix b/upstart-jobs/default.nix index fa92cd57c8f3..4569a9ff1ab2 100644 --- a/upstart-jobs/default.nix +++ b/upstart-jobs/default.nix @@ -308,7 +308,7 @@ let ++ optional config.services.vsftpd.enable (import ../upstart-jobs/vsftpd.nix { inherit (pkgs) vsftpd; - inherit (config.services.vsftpd) anonymousUser + inherit (config.services.vsftpd) anonymousUser localUsers writeEnable anonymousUploadEnable anonymousMkdirEnable; }) diff --git a/upstart-jobs/vsftpd.nix b/upstart-jobs/vsftpd.nix index 01a509ea679a..f24ae0490267 100644 --- a/upstart-jobs/vsftpd.nix +++ b/upstart-jobs/vsftpd.nix @@ -1,4 +1,4 @@ -{ vsftpd, anonymousUser +{ vsftpd, anonymousUser, localUsers , anonymousUploadEnable, anonymousMkdirEnable, writeEnable }: @@ -42,6 +42,13 @@ start script "anonymous_enable=YES" else "anonymous_enable=NO") + +(if localUsers then +" +local_enable=YES" +else +" +local_enable=NO" +) + (if writeEnable then " write_enable=YES" @@ -70,8 +77,16 @@ nopriv_user=vsftpd secure_chroot_dir=/var/ftp/empty EOF +" + + (if anonymousUser then +" mkdir -p /home/ftp && chown -R ftp:ftp /home/ftp +" + else "") + +" + mkdir -p /var/ftp/empty && + chown vsftpd /var/ftp/empty end script respawn ${vsftpd}/sbin/vsftpd /etc/vsftpd.conf From 72bb6b30b32a42702096cfbf74b64b89c2fec78e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sat, 28 Feb 2009 20:01:56 +0000 Subject: [PATCH 10/12] Adding the ftp pam service, for vsftpd. svn path=/nixos/trunk/; revision=14287 --- etc/default.nix | 1 + etc/pam.d/ftp | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 etc/pam.d/ftp diff --git a/etc/default.nix b/etc/default.nix index e2fc88744ce5..7c4d4af8c2c0 100644 --- a/etc/default.nix +++ b/etc/default.nix @@ -251,6 +251,7 @@ import ../helpers/make-etc.nix { "xlock" "kde" "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 From 8d3ee677d57588ff200e5d889d5f32572b4d7f82 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 6 Mar 2009 13:53:19 +0000 Subject: [PATCH 11/12] svn path=/nixos/trunk/; revision=14411 --- doc/manual/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ''; }; From 88fd4080b29e03c869fae838f59f81c72d40a57c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 6 Mar 2009 14:11:05 +0000 Subject: [PATCH 12/12] * Include the version in the name attribute. svn path=/nixos/trunk/; revision=14413 --- release.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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}"; };