summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-28 16:28:04 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-28 22:45:57 +0100
commit259f7a93b1e679b73026352b40029375aa94db7c (patch)
tree353259f8f7622375aa0a584e31ad16c20f95a6a3 /nixos/modules
parent44d6d887390bbf0fd99d2bf95d75e6292357fd50 (diff)
downloadnixpkgs-259f7a93b1e679b73026352b40029375aa94db7c.tar
nixpkgs-259f7a93b1e679b73026352b40029375aa94db7c.tar.gz
nixpkgs-259f7a93b1e679b73026352b40029375aa94db7c.tar.bz2
nixpkgs-259f7a93b1e679b73026352b40029375aa94db7c.tar.lz
nixpkgs-259f7a93b1e679b73026352b40029375aa94db7c.tar.xz
nixpkgs-259f7a93b1e679b73026352b40029375aa94db7c.tar.zst
nixpkgs-259f7a93b1e679b73026352b40029375aa94db7c.zip
Rename environment.nix -> nix.package
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/config/system-path.nix2
-rw-r--r--nixos/modules/installer/cd-dvd/channel.nix2
-rw-r--r--nixos/modules/installer/cd-dvd/iso-image.nix4
-rw-r--r--nixos/modules/installer/cd-dvd/system-tarball.nix4
-rw-r--r--nixos/modules/installer/tools/nixos-rebuild.sh2
-rw-r--r--nixos/modules/installer/tools/tools.nix4
-rw-r--r--nixos/modules/rename.nix1
-rw-r--r--nixos/modules/services/misc/nix-daemon.nix20
-rw-r--r--nixos/modules/services/misc/nix-gc.nix2
-rw-r--r--nixos/modules/virtualisation/amazon-image.nix4
-rw-r--r--nixos/modules/virtualisation/nova-image.nix4
-rw-r--r--nixos/modules/virtualisation/qemu-vm.nix2
-rw-r--r--nixos/modules/virtualisation/virtualbox-image.nix4
13 files changed, 28 insertions, 27 deletions
diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix
index 0610ad54da3..8dd92dd96af 100644
--- a/nixos/modules/config/system-path.nix
+++ b/nixos/modules/config/system-path.nix
@@ -14,7 +14,7 @@ let
     '';
 
   requiredPackages =
-    [ config.environment.nix
+    [ config.nix.package
       pkgs.acl
       pkgs.attr
       pkgs.bashInteractive # bash with ncurses support
diff --git a/nixos/modules/installer/cd-dvd/channel.nix b/nixos/modules/installer/cd-dvd/channel.nix
index c6e0f1577bb..bcf3dbb3f73 100644
--- a/nixos/modules/installer/cd-dvd/channel.nix
+++ b/nixos/modules/installer/cd-dvd/channel.nix
@@ -33,7 +33,7 @@ in
       if ! [ -e /var/lib/nixos/did-channel-init ]; then
         echo "unpacking the NixOS/Nixpkgs sources..."
         mkdir -p /nix/var/nix/profiles/per-user/root
-        ${config.environment.nix}/bin/nix-env -p /nix/var/nix/profiles/per-user/root/channels \
+        ${config.nix.package}/bin/nix-env -p /nix/var/nix/profiles/per-user/root/channels \
           -i ${channelSources} --quiet --option use-substitutes false
         mkdir -m 0700 -p /root/.nix-defexpr
         ln -s /nix/var/nix/profiles/per-user/root/channels /root/.nix-defexpr/channels
diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix
index de9728d677c..b803a3f188b 100644
--- a/nixos/modules/installer/cd-dvd/iso-image.nix
+++ b/nixos/modules/installer/cd-dvd/iso-image.nix
@@ -298,12 +298,12 @@ in
       ''
         # After booting, register the contents of the Nix store on the
         # CD in the Nix database in the tmpfs.
-        ${config.environment.nix}/bin/nix-store --load-db < /nix/store/nix-path-registration
+        ${config.nix.package}/bin/nix-store --load-db < /nix/store/nix-path-registration
 
         # nixos-rebuild also requires a "system" profile and an
         # /etc/NIXOS tag.
         touch /etc/NIXOS
-        ${config.environment.nix}/bin/nix-env -p /nix/var/nix/profiles/system --set /run/current-system
+        ${config.nix.package}/bin/nix-env -p /nix/var/nix/profiles/system --set /run/current-system
       '';
 
     # Add vfat support to the initrd to enable people to copy the
diff --git a/nixos/modules/installer/cd-dvd/system-tarball.nix b/nixos/modules/installer/cd-dvd/system-tarball.nix
index 6bf8eebdac5..8d678fba71f 100644
--- a/nixos/modules/installer/cd-dvd/system-tarball.nix
+++ b/nixos/modules/installer/cd-dvd/system-tarball.nix
@@ -77,14 +77,14 @@ in
         # After booting, register the contents of the Nix store on the
         # CD in the Nix database in the tmpfs.
         if [ -f /nix-path-registration ]; then
-          ${config.environment.nix}/bin/nix-store --load-db < /nix-path-registration &&
+          ${config.nix.package}/bin/nix-store --load-db < /nix-path-registration &&
           rm /nix-path-registration
         fi
 
         # nixos-rebuild also requires a "system" profile and an
         # /etc/NIXOS tag.
         touch /etc/NIXOS
-        ${config.environment.nix}/bin/nix-env -p /nix/var/nix/profiles/system --set /run/current-system
+        ${config.nix.package}/bin/nix-env -p /nix/var/nix/profiles/system --set /run/current-system
       '';
 
   };
diff --git a/nixos/modules/installer/tools/nixos-rebuild.sh b/nixos/modules/installer/tools/nixos-rebuild.sh
index d655210c90e..0eca902dd74 100644
--- a/nixos/modules/installer/tools/nixos-rebuild.sh
+++ b/nixos/modules/installer/tools/nixos-rebuild.sh
@@ -109,7 +109,7 @@ fi
 # more conservative.
 if [ "$action" != dry-run -a -n "$buildNix" ]; then
     echo "building Nix..." >&2
-    if ! nix-build '<nixpkgs/nixos>' -A config.environment.nix -o $tmpDir/nix "${extraBuildFlags[@]}" > /dev/null; then
+    if ! nix-build '<nixpkgs/nixos>' -A config.nix.package -o $tmpDir/nix "${extraBuildFlags[@]}" > /dev/null; then
         if ! nix-build '<nixpkgs/nixos>' -A nixFallback -o $tmpDir/nix "${extraBuildFlags[@]}" > /dev/null; then
             nix-build '<nixpkgs>' -A nixUnstable -o $tmpDir/nix "${extraBuildFlags[@]}" > /dev/null
         fi
diff --git a/nixos/modules/installer/tools/tools.nix b/nixos/modules/installer/tools/tools.nix
index 074c77b5146..2c68ec5fe22 100644
--- a/nixos/modules/installer/tools/tools.nix
+++ b/nixos/modules/installer/tools/tools.nix
@@ -22,10 +22,10 @@ let
     src = ./nixos-install.sh;
 
     inherit (pkgs) perl pathsFromGraph;
-    nix = config.environment.nix;
+    nix = config.nix.package;
 
     nixClosure = pkgs.runCommand "closure"
-      { exportReferencesGraph = ["refs" config.environment.nix]; }
+      { exportReferencesGraph = ["refs" config.nix.package]; }
       "cp refs $out";
   };
 
diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix
index 82ba051eebf..0a8383870ee 100644
--- a/nixos/modules/rename.nix
+++ b/nixos/modules/rename.nix
@@ -73,6 +73,7 @@ in zipModules ([]
 # ++ alias [ "services" "xserver" "slim" "theme" ] [ "services" "xserver" "displayManager" "slim" "theme" ]
 ++ obsolete [ "environment" "extraPackages" ] [ "environment" "systemPackages" ]
 ++ obsolete [ "environment" "enableBashCompletion" ] [ "programs" "bash" "enableCompletion" ]
+++ obsolete [ "environment" "nix" ] [ "nix" "package" ]
 
 ++ obsolete [ "security" "extraSetuidPrograms" ] [ "security" "setuidPrograms" ]
 ++ obsolete [ "networking" "enableWLAN" ] [ "networking" "wireless" "enable" ]
diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix
index d78c7fe2822..441b8606b01 100644
--- a/nixos/modules/services/misc/nix-daemon.nix
+++ b/nixos/modules/services/misc/nix-daemon.nix
@@ -6,7 +6,7 @@ let
 
   cfg = config.nix;
 
-  inherit (config.environment) nix;
+  nix = cfg.package;
 
   makeNixBuildUser = nr:
     { name = "nixbld${toString nr}";
@@ -55,16 +55,16 @@ in
 
   options = {
 
-    environment.nix = mkOption {
-      type = types.path;
-      default = pkgs.nix;
-      description = ''
-        This option specifies the Nix package instance to use throughout the system.
-      '';
-    };
-
     nix = {
 
+      package = mkOption {
+        type = types.path;
+        default = pkgs.nix;
+        description = ''
+          This option specifies the Nix package instance to use throughout the system.
+        '';
+      };
+
       maxJobs = mkOption {
         default = 1;
         example = 2;
@@ -302,7 +302,7 @@ in
       }
 
       // optionalAttrs cfg.distributedBuilds {
-        NIX_BUILD_HOOK = "${config.environment.nix}/libexec/nix/build-remote.pl";
+        NIX_BUILD_HOOK = "${nix}/libexec/nix/build-remote.pl";
         NIX_REMOTE_SYSTEMS = "/etc/nix/machines";
         NIX_CURRENT_LOAD = "/run/nix/current-load";
       }
diff --git a/nixos/modules/services/misc/nix-gc.nix b/nixos/modules/services/misc/nix-gc.nix
index ad6889ce142..0d7bc13b2ee 100644
--- a/nixos/modules/services/misc/nix-gc.nix
+++ b/nixos/modules/services/misc/nix-gc.nix
@@ -52,7 +52,7 @@ in
 
     systemd.services.nix-gc =
       { description = "Nix Garbage Collector";
-        script = "exec ${config.environment.nix}/bin/nix-collect-garbage ${cfg.options}";
+        script = "exec ${config.nix.package}/bin/nix-collect-garbage ${cfg.options}";
         startAt = optionalString cfg.automatic cfg.dates;
       };
 
diff --git a/nixos/modules/virtualisation/amazon-image.nix b/nixos/modules/virtualisation/amazon-image.nix
index 7e04f0d2911..cfc582170e6 100644
--- a/nixos/modules/virtualisation/amazon-image.nix
+++ b/nixos/modules/virtualisation/amazon-image.nix
@@ -40,10 +40,10 @@ with pkgs.lib;
 
           # Register the paths in the Nix database.
           printRegistration=1 perl ${pkgs.pathsFromGraph} /tmp/xchg/closure | \
-              chroot /mnt ${config.environment.nix}/bin/nix-store --load-db
+              chroot /mnt ${config.nix.package}/bin/nix-store --load-db
 
           # Create the system profile to allow nixos-rebuild to work.
-          chroot /mnt ${config.environment.nix}/bin/nix-env \
+          chroot /mnt ${config.nix.package}/bin/nix-env \
               -p /nix/var/nix/profiles/system --set ${config.system.build.toplevel}
 
           # `nixos-rebuild' requires an /etc/NIXOS.
diff --git a/nixos/modules/virtualisation/nova-image.nix b/nixos/modules/virtualisation/nova-image.nix
index ab625dba11d..5c9481b7127 100644
--- a/nixos/modules/virtualisation/nova-image.nix
+++ b/nixos/modules/virtualisation/nova-image.nix
@@ -46,10 +46,10 @@ with pkgs.lib;
 
           # Register the paths in the Nix database.
           printRegistration=1 perl ${pkgs.pathsFromGraph} /tmp/xchg/closure | \
-              chroot /mnt ${config.environment.nix}/bin/nix-store --load-db
+              chroot /mnt ${config.nix.package}/bin/nix-store --load-db
 
           # Create the system profile to allow nixos-rebuild to work.
-          chroot /mnt ${config.environment.nix}/bin/nix-env \
+          chroot /mnt ${config.nix.package}/bin/nix-env \
               -p /nix/var/nix/profiles/system --set ${config.system.build.toplevel}
 
           # `nixos-rebuild' requires an /etc/NIXOS.
diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix
index 708b462e0e5..6648b6514d0 100644
--- a/nixos/modules/virtualisation/qemu-vm.nix
+++ b/nixos/modules/virtualisation/qemu-vm.nix
@@ -329,7 +329,7 @@ in
     boot.postBootCommands =
       ''
         if [[ "$(cat /proc/cmdline)" =~ regInfo=([^ ]*) ]]; then
-          ${config.environment.nix}/bin/nix-store --load-db < ''${BASH_REMATCH[1]}
+          ${config.nix.package}/bin/nix-store --load-db < ''${BASH_REMATCH[1]}
         fi
       '';
 
diff --git a/nixos/modules/virtualisation/virtualbox-image.nix b/nixos/modules/virtualisation/virtualbox-image.nix
index e1b6def8edb..bea6414c450 100644
--- a/nixos/modules/virtualisation/virtualbox-image.nix
+++ b/nixos/modules/virtualisation/virtualbox-image.nix
@@ -53,10 +53,10 @@ with pkgs.lib;
 
           # Register the paths in the Nix database.
           printRegistration=1 perl ${pkgs.pathsFromGraph} /tmp/xchg/closure | \
-              chroot /mnt ${config.environment.nix}/bin/nix-store --load-db
+              chroot /mnt ${config.nix.package}/bin/nix-store --load-db
 
           # Create the system profile to allow nixos-rebuild to work.
-          chroot /mnt ${config.environment.nix}/bin/nix-env \
+          chroot /mnt ${config.nix.package}/bin/nix-env \
               -p /nix/var/nix/profiles/system --set ${config.system.build.toplevel}
 
           # `nixos-rebuild' requires an /etc/NIXOS.