diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-10-01 16:02:08 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-10-10 13:28:22 +0200 |
commit | c8628e09892acde58e5f4e6e2b1e317e248e9f10 (patch) | |
tree | 8772f67529e846d32006abac3a18581741cee444 /nixos/modules/installer | |
parent | 31203732b3104125e107a3141578399cab5d478f (diff) | |
download | nixlib-c8628e09892acde58e5f4e6e2b1e317e248e9f10.tar nixlib-c8628e09892acde58e5f4e6e2b1e317e248e9f10.tar.gz nixlib-c8628e09892acde58e5f4e6e2b1e317e248e9f10.tar.bz2 nixlib-c8628e09892acde58e5f4e6e2b1e317e248e9f10.tar.lz nixlib-c8628e09892acde58e5f4e6e2b1e317e248e9f10.tar.xz nixlib-c8628e09892acde58e5f4e6e2b1e317e248e9f10.tar.zst nixlib-c8628e09892acde58e5f4e6e2b1e317e248e9f10.zip |
nixos-checkout: Only fetch the Nixpkgs repo
Diffstat (limited to 'nixos/modules/installer')
-rw-r--r-- | nixos/modules/installer/tools/nixos-checkout.nix | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/nixos/modules/installer/tools/nixos-checkout.nix b/nixos/modules/installer/tools/nixos-checkout.nix index 1a734ca5eeb7..418998556864 100644 --- a/nixos/modules/installer/tools/nixos-checkout.nix +++ b/nixos/modules/installer/tools/nixos-checkout.nix @@ -1,8 +1,7 @@ # This module generates the nixos-checkout script, which replaces the -# NixOS and Nixpkgs source trees in /etc/nixos/{nixos,nixpkgs} with -# Git checkouts. +# Nixpkgs source trees in /etc/nixos/nixpkgs with a Git checkout. -{config, pkgs, ...}: +{ config, pkgs, ... }: with pkgs.lib; @@ -19,7 +18,7 @@ let if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then echo "Usage: `basename $0` [PREFIX]. See NixOS Manual for more info." exit 0 - fi + fi prefix="$1" if [ -z "$prefix" ]; then prefix=/etc/nixos; fi @@ -31,19 +30,14 @@ let nix-env -iA nixos.pkgs.git || nix-env -i git fi - # Move any old nixos or nixpkgs directories out of the way. + # Move any old nixpkgs directories out of the way. backupTimestamp=$(date "+%Y%m%d%H%M%S") - if [ -e nixos -a ! -e nixos/.git ]; then - mv nixos nixos-$backupTimestamp - fi - if [ -e nixpkgs -a ! -e nixpkgs/.git ]; then mv nixpkgs nixpkgs-$backupTimestamp fi # Check out the NixOS and Nixpkgs sources. - git clone git://github.com/NixOS/nixos.git nixos git clone git://github.com/NixOS/nixpkgs.git nixpkgs ''; }; |