Move stuff to modules/profiles/installation-device.nix
This commit is contained in:
parent
0f35f9bb69
commit
e5db79a859
@ -7,8 +7,7 @@ with lib;
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ ./channel.nix
|
[ ./iso-image.nix
|
||||||
./iso-image.nix
|
|
||||||
|
|
||||||
# Profiles of this basic installation CD.
|
# Profiles of this basic installation CD.
|
||||||
../../profiles/all-hardware.nix
|
../../profiles/all-hardware.nix
|
||||||
@ -21,18 +20,6 @@ with lib;
|
|||||||
|
|
||||||
isoImage.volumeID = substring 0 11 "NIXOS_ISO";
|
isoImage.volumeID = substring 0 11 "NIXOS_ISO";
|
||||||
|
|
||||||
# Make the installer more likely to succeed in low memory
|
|
||||||
# environments. The kernel's overcommit heustistics bite us
|
|
||||||
# fairly often, preventing processes such as nix-worker or
|
|
||||||
# download-using-manifests.pl from forking even if there is
|
|
||||||
# plenty of free memory.
|
|
||||||
boot.kernel.sysctl."vm.overcommit_memory" = "1";
|
|
||||||
|
|
||||||
# To speed up installation a little bit, include the complete stdenv
|
|
||||||
# in the Nix store on the CD. Archive::Cpio is needed for the
|
|
||||||
# initrd builder. nixos-artwork is needed for the GRUB background.
|
|
||||||
isoImage.storeContents = [ pkgs.stdenv pkgs.busybox pkgs.perlPackages.ArchiveCpio pkgs.nixos-artwork ];
|
|
||||||
|
|
||||||
# EFI booting
|
# EFI booting
|
||||||
isoImage.makeEfiBootable = true;
|
isoImage.makeEfiBootable = true;
|
||||||
|
|
||||||
|
@ -1,14 +1,11 @@
|
|||||||
# This module defines a small NixOS installation CD. It does not
|
# This module defines a small NixOS installation CD. It does not
|
||||||
# contain any graphical stuff.
|
# contain any graphical stuff.
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ ./installation-cd-base.nix
|
[ ./installation-cd-base.nix
|
||||||
../../profiles/minimal.nix
|
../../profiles/minimal.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enable in installer, even if minimal profile disables it
|
|
||||||
services.nixosManual.enable = lib.mkOverride 999 true;
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Provide a basic configuration for installation devices like CDs.
|
# Provide a basic configuration for installation devices like CDs.
|
||||||
{ config, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
@ -13,10 +13,17 @@ with lib;
|
|||||||
# Allow "nixos-rebuild" to work properly by providing
|
# Allow "nixos-rebuild" to work properly by providing
|
||||||
# /etc/nixos/configuration.nix.
|
# /etc/nixos/configuration.nix.
|
||||||
./clone-config.nix
|
./clone-config.nix
|
||||||
|
|
||||||
|
# Include a copy of Nixpkgs so that nixos-install works out of
|
||||||
|
# the box.
|
||||||
|
../installer/cd-dvd/channel.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
|
# Enable in installer, even if the minimal profile disables it.
|
||||||
|
services.nixosManual.enable = mkForce true;
|
||||||
|
|
||||||
# Show the manual.
|
# Show the manual.
|
||||||
services.nixosManual.showManual = true;
|
services.nixosManual.showManual = true;
|
||||||
|
|
||||||
@ -43,7 +50,7 @@ with lib;
|
|||||||
systemd.services.sshd.wantedBy = mkOverride 50 [];
|
systemd.services.sshd.wantedBy = mkOverride 50 [];
|
||||||
|
|
||||||
# Enable wpa_supplicant, but don't start it by default.
|
# Enable wpa_supplicant, but don't start it by default.
|
||||||
networking.wireless.enable = true;
|
networking.wireless.enable = mkDefault true;
|
||||||
jobs.wpa_supplicant.startOn = mkOverride 50 "";
|
jobs.wpa_supplicant.startOn = mkOverride 50 "";
|
||||||
|
|
||||||
# Tell the Nix evaluator to garbage collect more aggressively.
|
# Tell the Nix evaluator to garbage collect more aggressively.
|
||||||
@ -51,5 +58,17 @@ with lib;
|
|||||||
# (yet) have swap set up.
|
# (yet) have swap set up.
|
||||||
environment.variables.GC_INITIAL_HEAP_SIZE = "100000";
|
environment.variables.GC_INITIAL_HEAP_SIZE = "100000";
|
||||||
|
|
||||||
|
# Make the installer more likely to succeed in low memory
|
||||||
|
# environments. The kernel's overcommit heustistics bite us
|
||||||
|
# fairly often, preventing processes such as nix-worker or
|
||||||
|
# download-using-manifests.pl from forking even if there is
|
||||||
|
# plenty of free memory.
|
||||||
|
boot.kernel.sysctl."vm.overcommit_memory" = "1";
|
||||||
|
|
||||||
|
# To speed up installation a little bit, include the complete
|
||||||
|
# stdenv in the Nix store on the CD. Archive::Cpio is needed for
|
||||||
|
# the initrd builder.
|
||||||
|
system.extraDependencies = [ pkgs.stdenv pkgs.busybox pkgs.perlPackages.ArchiveCpio ];
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user