From 119c8f91e7f17d2cb95f42985816820600c389cf Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Fri, 18 Sep 2015 16:50:48 +0000 Subject: nixos: introduce system.nixosLabel option and use it where appropriate Setting nixosVersion to something custom is useful for meaningful GRUB menus and /nix/store paths, but actuallly changing it rebulids the whole system path (because of `nixos-version` script and manual pages). Also, changing it is not a particularly good idea because you can then be differentitated from other NixOS users by a lot of programs that read /etc/os-release. This patch introduces an alternative option that does all you want from nixosVersion, but rebuilds only the very top system level and /etc while using your label in the names of system /nix/store paths, GRUB and other boot loaders' menus, getty greetings and so on. --- nixos/modules/installer/cd-dvd/installation-cd-base.nix | 2 +- nixos/modules/installer/cd-dvd/iso-image.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'nixos/modules/installer/cd-dvd') diff --git a/nixos/modules/installer/cd-dvd/installation-cd-base.nix b/nixos/modules/installer/cd-dvd/installation-cd-base.nix index bc3bd872d2a5..2569860a098f 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.nixosVersion}-${pkgs.stdenv.system}.iso"; + isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixosLabel}-${pkgs.stdenv.system}.iso"; isoImage.volumeID = substring 0 11 "NIXOS_ISO"; diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix index fa9cc6fa20b9..b79191e0fd4b 100644 --- a/nixos/modules/installer/cd-dvd/iso-image.nix +++ b/nixos/modules/installer/cd-dvd/iso-image.nix @@ -39,7 +39,7 @@ let DEFAULT boot LABEL boot - MENU LABEL NixOS ${config.system.nixosVersion}${config.isoImage.appendToMenuLabel} + MENU LABEL NixOS ${config.system.nixosLabel}${config.isoImage.appendToMenuLabel} LINUX /boot/bzImage APPEND init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams} INITRD /boot/initrd -- cgit 1.4.1