mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
nixos-checkout: Add nixpkgs-channels as a remote
This way, you can do things like git checkout channels/nixos-14.12 to get the latest tested and built version of NixOS.
This commit is contained in:
parent
fedfcdedae
commit
e98da673e4
@ -1,5 +1,5 @@
|
|||||||
# This module generates the nixos-checkout script, which replaces the
|
# This module generates the nixos-checkout script, which performs a
|
||||||
# Nixpkgs source trees in /etc/nixos/nixpkgs with a Git checkout.
|
# checkout of the Nixpkgs Git repository.
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
@ -37,8 +37,19 @@ let
|
|||||||
mv nixpkgs nixpkgs-$backupTimestamp
|
mv nixpkgs nixpkgs-$backupTimestamp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check out the NixOS and Nixpkgs sources.
|
# Check out the Nixpkgs sources.
|
||||||
git clone git://github.com/NixOS/nixpkgs.git nixpkgs
|
if ! [ -e nixpkgs/.git ]; then
|
||||||
|
echo "Creating repository in $prefix/nixpkgs..."
|
||||||
|
git init --quiet nixpkgs
|
||||||
|
else
|
||||||
|
echo "Updating repository in $prefix/nixpkgs..."
|
||||||
|
fi
|
||||||
|
cd nixpkgs
|
||||||
|
git remote add origin git://github.com/NixOS/nixpkgs.git || true
|
||||||
|
git remote add channels git://github.com/NixOS/nixpkgs-channels.git || true
|
||||||
|
git remote set-url origin --push git@github.com:NixOS/nixpkgs.git
|
||||||
|
git remote update
|
||||||
|
git checkout master
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user