From a153de28bb79213903a53a8b5a0f36f92d082eec Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Fri, 18 Sep 2015 16:17:22 +0000 Subject: [PATCH] nixos: rename some outputs for better discoverability in /nix/store --- nixos/modules/system/activation/top-level.nix | 4 +++- nixos/modules/virtualisation/azure-image.nix | 2 +- nixos/modules/virtualisation/brightbox-image.nix | 2 +- nixos/modules/virtualisation/google-compute-image.nix | 2 +- nixos/modules/virtualisation/virtualbox-image.nix | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index a977ddb7bb4d..81088a56fb12 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -99,7 +99,9 @@ let # makes it bootable. baseSystem = showWarnings ( if [] == failed then pkgs.stdenv.mkDerivation { - name = "nixos-${config.system.nixosVersion}"; + name = let hn = config.networking.hostName; + nn = if (hn != "") then hn else "unnamed"; + in "nixos-system-${nn}-${config.system.nixosVersion}"; preferLocalBuild = true; allowSubstitutes = false; buildCommand = systemBuilder; diff --git a/nixos/modules/virtualisation/azure-image.nix b/nixos/modules/virtualisation/azure-image.nix index 3f554d127c35..1013396c0498 100644 --- a/nixos/modules/virtualisation/azure-image.nix +++ b/nixos/modules/virtualisation/azure-image.nix @@ -26,7 +26,7 @@ in ${pkgs.vmTools.qemu}/bin/qemu-img convert -f raw -O vpc $diskImage $out/disk.vhd rm $diskImage ''; - diskImageBase = "nixos-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw"; + diskImageBase = "nixos-image-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw"; buildInputs = [ pkgs.utillinux pkgs.perl ]; exportReferencesGraph = [ "closure" config.system.build.toplevel ]; diff --git a/nixos/modules/virtualisation/brightbox-image.nix b/nixos/modules/virtualisation/brightbox-image.nix index 3a956caca0c3..0eb46d39b521 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-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw"; + diskImageBase = "nixos-image-${config.system.nixosVersion}-${pkgs.stdenv.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 516da926f847..f21ddc12ca5a 100644 --- a/nixos/modules/virtualisation/google-compute-image.nix +++ b/nixos/modules/virtualisation/google-compute-image.nix @@ -30,7 +30,7 @@ in rm $out/disk.raw popd ''; - diskImageBase = "nixos-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw"; + diskImageBase = "nixos-image-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw"; buildInputs = [ pkgs.utillinux pkgs.perl ]; exportReferencesGraph = [ "closure" config.system.build.toplevel ]; diff --git a/nixos/modules/virtualisation/virtualbox-image.nix b/nixos/modules/virtualisation/virtualbox-image.nix index 767a8c339a3e..2d3b4834fc5b 100644 --- a/nixos/modules/virtualisation/virtualbox-image.nix +++ b/nixos/modules/virtualisation/virtualbox-image.nix @@ -101,7 +101,7 @@ in { system.build.virtualBoxOVA = pkgs.runCommand "virtualbox-ova" { buildInputs = [ pkgs.linuxPackages.virtualbox ]; vmName = "NixOS ${config.system.nixosVersion} (${pkgs.stdenv.system})"; - fileName = "nixos-${config.system.nixosVersion}-${pkgs.stdenv.system}.ova"; + fileName = "nixos-image-${config.system.nixosVersion}-${pkgs.stdenv.system}.ova"; } '' echo "creating VirtualBox VM..."