Tried to do offline install CD, not DVD. Failure, but some parts could be useful.
svn path=/nixos/trunk/; revision=10248
This commit is contained in:
parent
ca2b1e3b77
commit
7fa31be440
@ -26,6 +26,8 @@ let
|
||||
addUsers = arg "addUsers" [];
|
||||
extraInitrdKernelModules = arg "extraInitrdKernelModules" [];
|
||||
bootKernelModules = arg "bootKernelModules" [];
|
||||
arbitraryOverrides = arg "arbitraryOverrides" (config:{});
|
||||
cleanStart = arg "cleanStart" false;
|
||||
|
||||
/* Should return list of {configuration, suffix} attrsets.
|
||||
{configuration=configuration; suffix=""} is always prepended.
|
||||
@ -99,7 +101,7 @@ rec {
|
||||
nixpkgsRel = "nixpkgs" + (if networkNixpkgs != "" then "-" + networkNixpkgs else "");
|
||||
|
||||
|
||||
configuration = {
|
||||
configuration = let preConfiguration ={
|
||||
|
||||
boot = {
|
||||
autoDetectRootDevice = true;
|
||||
@ -238,19 +240,20 @@ rec {
|
||||
};
|
||||
|
||||
environment = {
|
||||
extraPackages = pkgs: [
|
||||
extraPackages = if cleanStart then pkgs:[] else pkgs: [
|
||||
pkgs.vim
|
||||
pkgs.subversion # for nixos-checkout
|
||||
pkgs.w3m # needed for the manual anyway
|
||||
] ++ (packages pkgs);
|
||||
checkConfigurationOptions = true;
|
||||
cleanStart = cleanStart;
|
||||
};
|
||||
|
||||
users = {
|
||||
extraUsers = map userEntry addUsers;
|
||||
};
|
||||
|
||||
};
|
||||
}; in preConfiguration // (arbitraryOverrides preConfiguration);
|
||||
|
||||
configurations = [{
|
||||
inherit configuration;
|
||||
|
36
configuration/rescue-cd-offline.nix
Normal file
36
configuration/rescue-cd-offline.nix
Normal file
@ -0,0 +1,36 @@
|
||||
{platform ? __currentSystem} :
|
||||
let
|
||||
isoFun = import ./rescue-cd-configurable.nix;
|
||||
in
|
||||
(isoFun {
|
||||
inherit platform;
|
||||
lib = (import ../pkgs/lib);
|
||||
|
||||
networkNixpkgs = "";
|
||||
manualEnabled = false;
|
||||
rogueEnabled = false;
|
||||
sshdEnabled = false;
|
||||
fontConfigEnabled = false;
|
||||
sudoEnable = false;
|
||||
includeMemtest = false;
|
||||
includeStdenv = false;
|
||||
includeBuildDeps = true;
|
||||
cleanStart = true;
|
||||
packages = pkgs: with pkgs; [
|
||||
bashInteractive
|
||||
bzip2
|
||||
coreutils
|
||||
curl
|
||||
e2fsprogs
|
||||
gnutar
|
||||
grub
|
||||
gzip
|
||||
less
|
||||
module_init_tools
|
||||
nano
|
||||
su
|
||||
udev
|
||||
upstart
|
||||
utillinux
|
||||
];
|
||||
}).rescueCD
|
@ -1849,6 +1849,18 @@ root ALL=(ALL) SETENV: ALL
|
||||
";
|
||||
};
|
||||
|
||||
cleanStart = mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = "
|
||||
There are some times when you want really small system for specific
|
||||
purpose and do not want default package list. Setting
|
||||
<varname>cleanStart<varname> to <literal>true</literal> allows you
|
||||
to create a system with empty path - only extraPackages will be
|
||||
included..
|
||||
";
|
||||
};
|
||||
|
||||
extraPackages = mkOption {
|
||||
default = pkgs: [];
|
||||
example = pkgs: [pkgs.firefox pkgs.thunderbird];
|
||||
|
@ -204,7 +204,19 @@ rec {
|
||||
|
||||
|
||||
# The packages you want in the boot environment.
|
||||
systemPathList = [
|
||||
systemPathList = (if config.environment.cleanStart then
|
||||
[
|
||||
# Better leave them here - they are small, needed,
|
||||
# and hard to refer from anywhere outside.
|
||||
modprobe
|
||||
nix
|
||||
nixosInstall
|
||||
nixosRebuild
|
||||
nixosCheckout
|
||||
setuidWrapper
|
||||
]
|
||||
else
|
||||
[
|
||||
modprobe # must take precedence over module_init_tools
|
||||
pkgs.bashInteractive # bash with ncurses support
|
||||
pkgs.bzip2
|
||||
@ -252,9 +264,9 @@ rec {
|
||||
nixosRebuild
|
||||
nixosCheckout
|
||||
setuidWrapper
|
||||
]
|
||||
])
|
||||
++ pkgs.lib.optional (config.security.sudo.enable) pkgs.sudo
|
||||
++ pkgs.lib.optional (config.networking.defaultMailServer.directDelivery) pkgs.ssmtp
|
||||
++ pkgs.lib.optional (config.networking.defaultMailServer.directDelivery) pkgs.ssmtp
|
||||
++ pkgs.lib.concatLists (map (job: job.extraPath) upstartJobs.jobs)
|
||||
++ (config.environment.extraPackages) pkgs
|
||||
++ pkgs.lib.optional (config.fonts.enableFontDir) fontDir;
|
||||
|
Loading…
Reference in New Issue
Block a user