diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2018-08-20 15:11:29 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2018-08-30 17:20:32 -0400 |
commit | 2c2f1e37d4374ea61caefd9389927ea03df4ce31 (patch) | |
tree | 1c0dff3f6483825a9143741bdddca44f35bb4224 /nixos | |
parent | 94f71d800db2ef7afb9fc8dad9e9aa503bfa2941 (diff) | |
download | nixpkgs-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar nixpkgs-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar.gz nixpkgs-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar.bz2 nixpkgs-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar.lz nixpkgs-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar.xz nixpkgs-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar.zst nixpkgs-2c2f1e37d4374ea61caefd9389927ea03df4ce31.zip |
reewide: Purge all uses `stdenv.system` and top-level `system`
It is deprecated and will be removed after 18.09.
Diffstat (limited to 'nixos')
18 files changed, 27 insertions, 24 deletions
diff --git a/nixos/lib/make-system-tarball.nix b/nixos/lib/make-system-tarball.nix index 92539235be7..846013b02d1 100644 --- a/nixos/lib/make-system-tarball.nix +++ b/nixos/lib/make-system-tarball.nix @@ -1,7 +1,7 @@ { stdenv, perl, pixz, pathsFromGraph , # The file name of the resulting tarball - fileName ? "nixos-system-${stdenv.system}" + fileName ? "nixos-system-${stdenv.hostPlatform.system}" , # The files and directories to be placed in the tarball. # This is a list of attribute sets {source, target} where `source' diff --git a/nixos/lib/qemu-flags.nix b/nixos/lib/qemu-flags.nix index f115ca5ac00..779f0377a51 100644 --- a/nixos/lib/qemu-flags.nix +++ b/nixos/lib/qemu-flags.nix @@ -14,12 +14,12 @@ in qemuSerialDevice = if pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64 then "ttyS0" else if pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64 then "ttyAMA0" - else throw "Unknown QEMU serial device for system '${pkgs.stdenv.system}'"; + else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'"; qemuBinary = qemuPkg: { "x86_64-linux" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64"; "armv7l-linux" = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host"; "aarch64-linux" = "${qemuPkg}/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host"; "x86_64-darwin" = "${qemuPkg}/bin/qemu-kvm -cpu kvm64"; - }.${pkgs.stdenv.system} or "${qemuPkg}/bin/qemu-kvm"; + }.${pkgs.stdenv.hostPlatform.system} or "${qemuPkg}/bin/qemu-kvm"; } diff --git a/nixos/modules/installer/cd-dvd/installation-cd-base.nix b/nixos/modules/installer/cd-dvd/installation-cd-base.nix index 1453e8082b0..24070a78694 100644 --- a/nixos/modules/installer/cd-dvd/installation-cd-base.nix +++ b/nixos/modules/installer/cd-dvd/installation-cd-base.nix @@ -16,7 +16,7 @@ with lib; ]; # ISO naming. - isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.system}.iso"; + isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso"; isoImage.volumeID = substring 0 11 "NIXOS_ISO"; diff --git a/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix b/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix index bd6cf029967..86e19f3da56 100644 --- a/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix +++ b/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix @@ -16,7 +16,8 @@ in ]; assertions = lib.singleton { - assertion = pkgs.stdenv.system == "aarch64-linux"; + assertion = pkgs.stdenv.hostPlatform.system == "aarch64-linux" + && pkgs.stdenv.hostPlatform.system == pkgs.stdenv.buildPlatform.system; message = "sd-image-aarch64.nix can be only built natively on Aarch64 / ARM64; " + "it cannot be cross compiled"; }; diff --git a/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix b/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix index 0c89eb53335..695c79ca170 100644 --- a/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix +++ b/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix @@ -16,7 +16,8 @@ in ]; assertions = lib.singleton { - assertion = pkgs.stdenv.system == "armv7l-linux"; + assertion = pkgs.stdenv.hostPlatform.system == "armv7l-linux" + && pkgs.stdenv.hostPlatform.system == pkgs.stdenv.buildPlatform.system; message = "sd-image-armv7l-multiplatform.nix can be only built natively on ARMv7; " + "it cannot be cross compiled"; }; diff --git a/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix b/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix index 78ea3f1a205..e395b265d15 100644 --- a/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix +++ b/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix @@ -16,7 +16,8 @@ in ]; assertions = lib.singleton { - assertion = pkgs.stdenv.system == "armv6l-linux"; + assertion = pkgs.stdenv.hostPlatform.system == "armv6l-linux" + && pkgs.stdenv.hostPlatform.system == pkgs.stdenv.buildPlatform.system; message = "sd-image-raspberrypi.nix can be only built natively on ARMv6; " + "it cannot be cross compiled"; }; diff --git a/nixos/modules/installer/cd-dvd/sd-image.nix b/nixos/modules/installer/cd-dvd/sd-image.nix index 2371be9d89a..b6e1d11c2b5 100644 --- a/nixos/modules/installer/cd-dvd/sd-image.nix +++ b/nixos/modules/installer/cd-dvd/sd-image.nix @@ -22,7 +22,7 @@ in { options.sdImage = { imageName = mkOption { - default = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.system}.img"; + default = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.img"; description = '' Name of the generated image file. ''; @@ -102,7 +102,7 @@ in mkdir -p $out/nix-support $out/sd-image export img=$out/sd-image/${config.sdImage.imageName} - echo "${pkgs.stdenv.system}" > $out/nix-support/system + echo "${pkgs.stdenv.buildPlatform.system}" > $out/nix-support/system echo "file sd-image $img" >> $out/nix-support/hydra-build-products # Create the image file sized to fit /boot and /, plus 20M of slack diff --git a/nixos/modules/installer/netboot/netboot.nix b/nixos/modules/installer/netboot/netboot.nix index ea640173c6d..303d9fce3f9 100644 --- a/nixos/modules/installer/netboot/netboot.nix +++ b/nixos/modules/installer/netboot/netboot.nix @@ -25,7 +25,7 @@ with lib; # !!! Hack - attributes expected by other modules. environment.systemPackages = [ pkgs.grub2_efi ] - ++ (if pkgs.stdenv.system == "aarch64-linux" + ++ (if pkgs.stdenv.hostPlatform.system == "aarch64-linux" then [] else [ pkgs.grub2 pkgs.syslinux ]); diff --git a/nixos/modules/services/misc/gitit.nix b/nixos/modules/services/misc/gitit.nix index 0025d96bd37..1ec030549f9 100644 --- a/nixos/modules/services/misc/gitit.nix +++ b/nixos/modules/services/misc/gitit.nix @@ -10,7 +10,7 @@ let toYesNo = b: if b then "yes" else "no"; - gititShared = with cfg.haskellPackages; gitit + "/share/" + pkgs.stdenv.system + "-" + ghc.name + "/" + gitit.pname + "-" + gitit.version; + gititShared = with cfg.haskellPackages; gitit + "/share/" + pkgs.stdenv.hostPlatform.system + "-" + ghc.name + "/" + gitit.pname + "-" + gitit.version; gititWithPkgs = hsPkgs: extras: hsPkgs.ghcWithPackages (self: with self; [ gitit ] ++ (extras self)); diff --git a/nixos/modules/services/networking/vsftpd.nix b/nixos/modules/services/networking/vsftpd.nix index 1f9107c3ce9..31e1e65fa9c 100644 --- a/nixos/modules/services/networking/vsftpd.nix +++ b/nixos/modules/services/networking/vsftpd.nix @@ -99,7 +99,7 @@ let nopriv_user=vsftpd secure_chroot_dir=/var/empty syslog_enable=YES - ${optionalString (pkgs.stdenv.system == "x86_64-linux") '' + ${optionalString (pkgs.stdenv.hostPlatform.system == "x86_64-linux") '' seccomp_sandbox=NO ''} anon_umask=${cfg.anonymousUmask} diff --git a/nixos/modules/system/boot/luksroot.nix b/nixos/modules/system/boot/luksroot.nix index 27c1f891f48..ed8b9f01e27 100644 --- a/nixos/modules/system/boot/luksroot.nix +++ b/nixos/modules/system/boot/luksroot.nix @@ -324,7 +324,7 @@ in [ "aes" "aes_generic" "blowfish" "twofish" "serpent" "cbc" "xts" "lrw" "sha1" "sha256" "sha512" - (if pkgs.stdenv.system == "x86_64-linux" then "aes_x86_64" else "aes_i586") + (if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then "aes_x86_64" else "aes_i586") ]; description = '' A list of cryptographic kernel modules needed to decrypt the root device(s). diff --git a/nixos/modules/virtualisation/azure-agent.nix b/nixos/modules/virtualisation/azure-agent.nix index b7ab54aab7e..770cefbcd51 100644 --- a/nixos/modules/virtualisation/azure-agent.nix +++ b/nixos/modules/virtualisation/azure-agent.nix @@ -77,7 +77,7 @@ in config = mkIf cfg.enable { assertions = [ { assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64; - message = "Azure not currently supported on ${pkgs.stdenv.system}"; + message = "Azure not currently supported on ${pkgs.stdenv.hostPlatform.system}"; } { assertion = config.networking.networkmanager.enable == false; message = "Windows Azure Linux Agent is not compatible with NetworkManager"; diff --git a/nixos/modules/virtualisation/brightbox-image.nix b/nixos/modules/virtualisation/brightbox-image.nix index 39a655b4c10..e716982c510 100644 --- a/nixos/modules/virtualisation/brightbox-image.nix +++ b/nixos/modules/virtualisation/brightbox-image.nix @@ -26,7 +26,7 @@ in rm $diskImageBase popd ''; - diskImageBase = "nixos-image-${config.system.nixos.label}-${pkgs.stdenv.system}.raw"; + diskImageBase = "nixos-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.raw"; buildInputs = [ pkgs.utillinux pkgs.perl ]; exportReferencesGraph = [ "closure" config.system.build.toplevel ]; diff --git a/nixos/modules/virtualisation/google-compute-image.nix b/nixos/modules/virtualisation/google-compute-image.nix index de2c43b8a40..4c7cffcf455 100644 --- a/nixos/modules/virtualisation/google-compute-image.nix +++ b/nixos/modules/virtualisation/google-compute-image.nix @@ -14,7 +14,7 @@ in PATH=$PATH:${pkgs.stdenv.lib.makeBinPath [ pkgs.gnutar pkgs.gzip ]} pushd $out mv $diskImage disk.raw - tar -Szcf nixos-image-${config.system.nixos.label}-${pkgs.stdenv.system}.raw.tar.gz disk.raw + tar -Szcf nixos-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.raw.tar.gz disk.raw rm $out/disk.raw popd ''; diff --git a/nixos/modules/virtualisation/virtualbox-guest.nix b/nixos/modules/virtualisation/virtualbox-guest.nix index 78c6f740788..834b994e92d 100644 --- a/nixos/modules/virtualisation/virtualbox-guest.nix +++ b/nixos/modules/virtualisation/virtualbox-guest.nix @@ -34,7 +34,7 @@ in config = mkIf cfg.enable (mkMerge [{ assertions = [{ assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64; - message = "Virtualbox not currently supported on ${pkgs.stdenv.system}"; + message = "Virtualbox not currently supported on ${pkgs.stdenv.hostPlatform.system}"; }]; environment.systemPackages = [ kernel.virtualboxGuestAdditions ]; diff --git a/nixos/modules/virtualisation/virtualbox-image.nix b/nixos/modules/virtualisation/virtualbox-image.nix index 475852d1546..60048911658 100644 --- a/nixos/modules/virtualisation/virtualbox-image.nix +++ b/nixos/modules/virtualisation/virtualbox-image.nix @@ -26,21 +26,21 @@ in { }; vmDerivationName = mkOption { type = types.str; - default = "nixos-ova-${config.system.nixos.label}-${pkgs.stdenv.system}"; + default = "nixos-ova-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}"; description = '' The name of the derivation for the VirtualBox appliance. ''; }; vmName = mkOption { type = types.str; - default = "NixOS ${config.system.nixos.label} (${pkgs.stdenv.system})"; + default = "NixOS ${config.system.nixos.label} (${pkgs.stdenv.hostPlatform.system})"; description = '' The name of the VirtualBox appliance. ''; }; vmFileName = mkOption { type = types.str; - default = "nixos-${config.system.nixos.label}-${pkgs.stdenv.system}.ova"; + default = "nixos-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.ova"; description = '' The file name of the VirtualBox appliance. ''; @@ -67,10 +67,10 @@ in { echo "creating VirtualBox VM..." vmName="${cfg.vmName}"; VBoxManage createvm --name "$vmName" --register \ - --ostype ${if pkgs.stdenv.system == "x86_64-linux" then "Linux26_64" else "Linux26"} + --ostype ${if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then "Linux26_64" else "Linux26"} VBoxManage modifyvm "$vmName" \ --memory ${toString cfg.memorySize} --acpi on --vram 32 \ - ${optionalString (pkgs.stdenv.system == "i686-linux") "--pae on"} \ + ${optionalString (pkgs.stdenv.hostPlatform.system == "i686-linux") "--pae on"} \ --nictype1 virtio --nic1 nat \ --audiocontroller ac97 --audio alsa \ --rtcuseutc on \ diff --git a/nixos/modules/virtualisation/vmware-guest.nix b/nixos/modules/virtualisation/vmware-guest.nix index 68930a0e325..15c78f14c52 100644 --- a/nixos/modules/virtualisation/vmware-guest.nix +++ b/nixos/modules/virtualisation/vmware-guest.nix @@ -22,7 +22,7 @@ in config = mkIf cfg.enable { assertions = [ { assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64; - message = "VMWare guest is not currently supported on ${pkgs.stdenv.system}"; + message = "VMWare guest is not currently supported on ${pkgs.stdenv.hostPlatform.system}"; } ]; environment.systemPackages = [ open-vm-tools ]; diff --git a/nixos/modules/virtualisation/xen-dom0.nix b/nixos/modules/virtualisation/xen-dom0.nix index cf57868acef..70e575b6c0d 100644 --- a/nixos/modules/virtualisation/xen-dom0.nix +++ b/nixos/modules/virtualisation/xen-dom0.nix @@ -146,7 +146,7 @@ in config = mkIf cfg.enable { assertions = [ { assertion = pkgs.stdenv.isx86_64; - message = "Xen currently not supported on ${pkgs.stdenv.system}"; + message = "Xen currently not supported on ${pkgs.stdenv.hostPlatform.system}"; } { assertion = config.boot.loader.grub.enable && (config.boot.loader.grub.efiSupport == false); message = "Xen currently does not support EFI boot"; |