Refactor variable names

This commit is contained in:
Eelco Dolstra 2013-10-11 14:17:59 +02:00
parent 57ec8424e4
commit f42d494355
2 changed files with 17 additions and 17 deletions

View File

@ -414,7 +414,7 @@ properly:
<screen> <screen>
$ export NIXOS_CONFIG=/etc/nixos/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix $ export NIXOS_CONFIG=/etc/nixos/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix
$ nix-build /etc/nixos/nixos -A config.system.build.nixosInstall $ nix-build /etc/nixos/nixos -A config.system.build.nixos-install
$ dd if=/dev/zero of=diskimage seek=2G count=0 bs=1 $ dd if=/dev/zero of=diskimage seek=2G count=0 bs=1
$ yes | mke2fs -j diskimage $ yes | mke2fs -j diskimage
$ mount -o loop diskimage /mnt $ mount -o loop diskimage /mnt

View File

@ -4,7 +4,7 @@
{ config, pkgs, modulesPath, ... }: { config, pkgs, modulesPath, ... }:
let let
### implementation
cfg = config.installer; cfg = config.installer;
makeProg = args: pkgs.substituteAll (args // { makeProg = args: pkgs.substituteAll (args // {
@ -12,12 +12,12 @@ let
isExecutable = true; isExecutable = true;
}); });
nixosBuildVMS = makeProg { nixos-build-vms = makeProg {
name = "nixos-build-vms"; name = "nixos-build-vms";
src = ./nixos-build-vms/nixos-build-vms.sh; src = ./nixos-build-vms/nixos-build-vms.sh;
}; };
nixosInstall = makeProg { nixos-install = makeProg {
name = "nixos-install"; name = "nixos-install";
src = ./nixos-install.sh; src = ./nixos-install.sh;
@ -29,7 +29,7 @@ let
"cp refs $out"; "cp refs $out";
}; };
nixosRebuild = makeProg { nixos-rebuild = makeProg {
name = "nixos-rebuild"; name = "nixos-rebuild";
src = ./nixos-rebuild.sh; src = ./nixos-rebuild.sh;
}; };
@ -41,24 +41,24 @@ let
}; };
*/ */
nixosHardwareScan = makeProg { nixos-hardware-scan = makeProg {
name = "nixos-hardware-scan"; name = "nixos-hardware-scan";
src = ./nixos-hardware-scan.pl; src = ./nixos-hardware-scan.pl;
inherit (pkgs) perl dmidecode; inherit (pkgs) perl dmidecode;
}; };
nixosOption = makeProg { nixos-option = makeProg {
name = "nixos-option"; name = "nixos-option";
src = ./nixos-option.sh; src = ./nixos-option.sh;
}; };
nixosVersion = makeProg { nixos-version = makeProg {
name = "nixos-version"; name = "nixos-version";
src = ./nixos-version.sh; src = ./nixos-version.sh;
inherit (config.system) nixosVersion nixosCodeName; inherit (config.system) nixosVersion nixosCodeName;
}; };
nixosGui = pkgs.xulrunnerWrapper { nixos-gui = pkgs.xulrunnerWrapper {
launcher = "nixos-gui"; launcher = "nixos-gui";
application = pkgs.stdenv.mkDerivation { application = pkgs.stdenv.mkDerivation {
name = "nixos-gui"; name = "nixos-gui";
@ -96,17 +96,17 @@ in
config = { config = {
environment.systemPackages = environment.systemPackages =
[ nixosBuildVMS [ nixos-build-vms
nixosInstall nixos-install
nixosRebuild nixos-rebuild
nixosHardwareScan nixos-hardware-scan
#nixosGenSeccureKeys #nixosGenSeccureKeys
nixosOption nixos-option
nixosVersion nixos-version
] ++ pkgs.lib.optional cfg.enableGraphicalTools nixosGui; ] ++ pkgs.lib.optional cfg.enableGraphicalTools nixos-gui;
system.build = { system.build = {
inherit nixosInstall nixosHardwareScan nixosOption; inherit nixos-install nixos-hardware-scan nixos-option;
}; };
}; };
} }