From f42d494355dd71200ac62cba3b4e2a9f95af3be6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 11 Oct 2013 14:17:59 +0200 Subject: [PATCH] Refactor variable names --- nixos/doc/manual/development.xml | 2 +- nixos/modules/installer/tools/tools.nix | 32 ++++++++++++------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/nixos/doc/manual/development.xml b/nixos/doc/manual/development.xml index d8b5f6f571cc..7b4e6df5f878 100644 --- a/nixos/doc/manual/development.xml +++ b/nixos/doc/manual/development.xml @@ -414,7 +414,7 @@ properly: $ 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 $ yes | mke2fs -j diskimage $ mount -o loop diskimage /mnt diff --git a/nixos/modules/installer/tools/tools.nix b/nixos/modules/installer/tools/tools.nix index c761d74a8902..1c1b109c1478 100644 --- a/nixos/modules/installer/tools/tools.nix +++ b/nixos/modules/installer/tools/tools.nix @@ -4,7 +4,7 @@ { config, pkgs, modulesPath, ... }: let - ### implementation + cfg = config.installer; makeProg = args: pkgs.substituteAll (args // { @@ -12,12 +12,12 @@ let isExecutable = true; }); - nixosBuildVMS = makeProg { + nixos-build-vms = makeProg { name = "nixos-build-vms"; src = ./nixos-build-vms/nixos-build-vms.sh; }; - nixosInstall = makeProg { + nixos-install = makeProg { name = "nixos-install"; src = ./nixos-install.sh; @@ -29,7 +29,7 @@ let "cp refs $out"; }; - nixosRebuild = makeProg { + nixos-rebuild = makeProg { name = "nixos-rebuild"; src = ./nixos-rebuild.sh; }; @@ -41,24 +41,24 @@ let }; */ - nixosHardwareScan = makeProg { + nixos-hardware-scan = makeProg { name = "nixos-hardware-scan"; src = ./nixos-hardware-scan.pl; inherit (pkgs) perl dmidecode; }; - nixosOption = makeProg { + nixos-option = makeProg { name = "nixos-option"; src = ./nixos-option.sh; }; - nixosVersion = makeProg { + nixos-version = makeProg { name = "nixos-version"; src = ./nixos-version.sh; inherit (config.system) nixosVersion nixosCodeName; }; - nixosGui = pkgs.xulrunnerWrapper { + nixos-gui = pkgs.xulrunnerWrapper { launcher = "nixos-gui"; application = pkgs.stdenv.mkDerivation { name = "nixos-gui"; @@ -96,17 +96,17 @@ in config = { environment.systemPackages = - [ nixosBuildVMS - nixosInstall - nixosRebuild - nixosHardwareScan + [ nixos-build-vms + nixos-install + nixos-rebuild + nixos-hardware-scan #nixosGenSeccureKeys - nixosOption - nixosVersion - ] ++ pkgs.lib.optional cfg.enableGraphicalTools nixosGui; + nixos-option + nixos-version + ] ++ pkgs.lib.optional cfg.enableGraphicalTools nixos-gui; system.build = { - inherit nixosInstall nixosHardwareScan nixosOption; + inherit nixos-install nixos-hardware-scan nixos-option; }; }; }