summary refs log tree commit diff
path: root/nixos/modules/system/activation/top-level.nix
diff options
context:
space:
mode:
authorJan Malakhovski <oxij@oxij.org>2015-09-18 16:17:22 +0000
committerJan Malakhovski <oxij@oxij.org>2015-09-18 19:00:20 +0000
commita153de28bb79213903a53a8b5a0f36f92d082eec (patch)
tree5e2df9397aee2c74e392d195a5bd4c624233d8c9 /nixos/modules/system/activation/top-level.nix
parentc8ea6c07c655ba70cf46c52063276bfcfa5b1643 (diff)
downloadnixlib-a153de28bb79213903a53a8b5a0f36f92d082eec.tar
nixlib-a153de28bb79213903a53a8b5a0f36f92d082eec.tar.gz
nixlib-a153de28bb79213903a53a8b5a0f36f92d082eec.tar.bz2
nixlib-a153de28bb79213903a53a8b5a0f36f92d082eec.tar.lz
nixlib-a153de28bb79213903a53a8b5a0f36f92d082eec.tar.xz
nixlib-a153de28bb79213903a53a8b5a0f36f92d082eec.tar.zst
nixlib-a153de28bb79213903a53a8b5a0f36f92d082eec.zip
nixos: rename some outputs for better discoverability in /nix/store
Diffstat (limited to 'nixos/modules/system/activation/top-level.nix')
-rw-r--r--nixos/modules/system/activation/top-level.nix4
1 files changed, 3 insertions, 1 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;