mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 23:36:17 +01:00
119c8f91e7
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.
34 lines
801 B
Nix
34 lines
801 B
Nix
# This module contains the basic configuration for building a NixOS
|
|
# installation CD.
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
imports =
|
|
[ ./iso-image.nix
|
|
|
|
# Profiles of this basic installation CD.
|
|
../../profiles/all-hardware.nix
|
|
../../profiles/base.nix
|
|
../../profiles/installation-device.nix
|
|
];
|
|
|
|
# ISO naming.
|
|
isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixosLabel}-${pkgs.stdenv.system}.iso";
|
|
|
|
isoImage.volumeID = substring 0 11 "NIXOS_ISO";
|
|
|
|
# EFI booting
|
|
isoImage.makeEfiBootable = true;
|
|
|
|
# USB booting
|
|
isoImage.makeUsbBootable = true;
|
|
|
|
# Add Memtest86+ to the CD.
|
|
boot.loader.grub.memtest86.enable = true;
|
|
|
|
# Allow the user to log in as root without a password.
|
|
users.extraUsers.root.initialHashedPassword = "";
|
|
}
|