nixos-checkout: Only fetch the Nixpkgs repo
This commit is contained in:
parent
31203732b3
commit
c8628e0989
|
@ -1,8 +1,7 @@
|
||||||
# This module generates the nixos-checkout script, which replaces the
|
# This module generates the nixos-checkout script, which replaces the
|
||||||
# NixOS and Nixpkgs source trees in /etc/nixos/{nixos,nixpkgs} with
|
# Nixpkgs source trees in /etc/nixos/nixpkgs with a Git checkout.
|
||||||
# Git checkouts.
|
|
||||||
|
|
||||||
{config, pkgs, ...}:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
with pkgs.lib;
|
with pkgs.lib;
|
||||||
|
|
||||||
|
@ -31,19 +30,14 @@ let
|
||||||
nix-env -iA nixos.pkgs.git || nix-env -i git
|
nix-env -iA nixos.pkgs.git || nix-env -i git
|
||||||
fi
|
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")
|
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
|
if [ -e nixpkgs -a ! -e nixpkgs/.git ]; then
|
||||||
mv nixpkgs nixpkgs-$backupTimestamp
|
mv nixpkgs nixpkgs-$backupTimestamp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check out the NixOS and Nixpkgs sources.
|
# 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
|
git clone git://github.com/NixOS/nixpkgs.git nixpkgs
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue