diff options
author | John Ericson <mail@JohnEricson.me> | 2018-08-31 09:56:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-31 09:56:10 -0400 |
commit | 2c4a75e9ef9721d2c1a96701a6271f94ee0bdc93 (patch) | |
tree | 46c1a6242a2243d6d6bd04d0dcb234056bc01c14 /nixos/modules | |
parent | f7606a82ed6bbf93c015c01b4067c7529ab3e74e (diff) | |
parent | 0828e2d8c369604c56219bd7085256b984087280 (diff) | |
download | nixlib-2c4a75e9ef9721d2c1a96701a6271f94ee0bdc93.tar nixlib-2c4a75e9ef9721d2c1a96701a6271f94ee0bdc93.tar.gz nixlib-2c4a75e9ef9721d2c1a96701a6271f94ee0bdc93.tar.bz2 nixlib-2c4a75e9ef9721d2c1a96701a6271f94ee0bdc93.tar.lz nixlib-2c4a75e9ef9721d2c1a96701a6271f94ee0bdc93.tar.xz nixlib-2c4a75e9ef9721d2c1a96701a6271f94ee0bdc93.tar.zst nixlib-2c4a75e9ef9721d2c1a96701a6271f94ee0bdc93.zip |
Merge pull request #45820 from obsidiansystems/dont-use-obsolete-platform-aliases
treewide: Dont use obsolete platform aliases
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/installer/cd-dvd/installation-cd-base.nix | 2 | ||||
-rw-r--r-- | nixos/modules/installer/cd-dvd/sd-image-aarch64.nix | 3 | ||||
-rw-r--r-- | nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix | 3 | ||||
-rw-r--r-- | nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix | 3 | ||||
-rw-r--r-- | nixos/modules/installer/cd-dvd/sd-image.nix | 4 | ||||
-rw-r--r-- | nixos/modules/installer/netboot/netboot.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/misc/gitit.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/networking/vsftpd.nix | 2 | ||||
-rw-r--r-- | nixos/modules/system/boot/luksroot.nix | 2 | ||||
-rw-r--r-- | nixos/modules/virtualisation/azure-agent.nix | 2 | ||||
-rw-r--r-- | nixos/modules/virtualisation/brightbox-image.nix | 2 | ||||
-rw-r--r-- | nixos/modules/virtualisation/google-compute-image.nix | 2 | ||||
-rw-r--r-- | nixos/modules/virtualisation/virtualbox-guest.nix | 2 | ||||
-rw-r--r-- | nixos/modules/virtualisation/virtualbox-image.nix | 10 | ||||
-rw-r--r-- | nixos/modules/virtualisation/vmware-guest.nix | 2 | ||||
-rw-r--r-- | nixos/modules/virtualisation/xen-dom0.nix | 2 |
16 files changed, 24 insertions, 21 deletions
diff --git a/nixos/modules/installer/cd-dvd/installation-cd-base.nix b/nixos/modules/installer/cd-dvd/installation-cd-base.nix index 1453e8082b0d..24070a786945 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 bd6cf029967c..86e19f3da562 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 0c89eb533359..695c79ca1707 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 78ea3f1a205c..e395b265d15e 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 2371be9d89a1..b6e1d11c2b54 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 ea640173c6dd..303d9fce3f9a 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 0025d96bd37b..1ec030549f98 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 1f9107c3ce9c..31e1e65fa9ca 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 27c1f891f485..ed8b9f01e275 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 b7ab54aab7ec..770cefbcd511 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 39a655b4c104..e716982c510a 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 de2c43b8a40a..4c7cffcf4557 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 78c6f740788e..834b994e92d2 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 475852d1546c..60048911658c 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 68930a0e3254..15c78f14c524 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 cf57868acef9..70e575b6c0d2 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"; |