s/nixos-fetch-git/fetchgit/
This commit is contained in:
parent
0fa8921e80
commit
d4ca5907d6
@ -14,7 +14,18 @@ nixos_config=$config_root/modules/$host
|
||||
secrets_nix=$secrets_root/$host/nix
|
||||
secrets_rsync=$secrets_root/$host/rsync
|
||||
|
||||
nixos-fetch-git "$host"
|
||||
(
|
||||
# Notice NIX_PATH used from host
|
||||
# Notice secrets required to evaluate configuration
|
||||
NIX_PATH=$NIX_PATH:nixos-config=$nixos_config
|
||||
NIX_PATH=$NIX_PATH:secrets=$secrets_nix
|
||||
export NIX_PATH
|
||||
|
||||
rev=$(new-nixos-query nixpkgs.rev)
|
||||
url=$(new-nixos-query nixpkgs.url)
|
||||
|
||||
fetchgit "$rev" "$url" tmp/nixpkgs/$host
|
||||
)
|
||||
|
||||
nix-build \
|
||||
-I "$nixpkgs" \
|
||||
|
@ -1,32 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# nixos-fetch-git : nixos-config -> ...
|
||||
#
|
||||
set -euf
|
||||
|
||||
host=$1
|
||||
|
||||
target=root@$host
|
||||
|
||||
git_rev=$(nixos-query "$host" nixpkgs.rev)
|
||||
git_url=$(nixos-query "$host" nixpkgs.url)
|
||||
|
||||
worktree=$nixpkgs_root/$host
|
||||
|
||||
if [ ! -d "$worktree" ]; then
|
||||
mkdir -p "$worktree"
|
||||
fi
|
||||
|
||||
cd "$worktree"
|
||||
|
||||
git init -q
|
||||
|
||||
if ! current_url=$(git config remote.src.url); then
|
||||
git remote add src "$git_url"
|
||||
elif [ "$current_url" != "$git_url" ]; then
|
||||
git remote set-url src "$git_url"
|
||||
fi
|
||||
|
||||
git fetch src
|
||||
|
||||
git checkout "$git_rev"
|
@ -5,16 +5,19 @@ serverspec=$1
|
||||
systemname=$2
|
||||
|
||||
(
|
||||
PATH=$PWD/bin:$PATH
|
||||
export PATH
|
||||
|
||||
# Notice NIX_PATH used from host
|
||||
# Notice secrets required to evaluate configuration
|
||||
NIX_PATH=$NIX_PATH:nixos-config=$PWD/modules/$systemname
|
||||
NIX_PATH=$NIX_PATH:secrets=$PWD/secrets/$systemname/nix
|
||||
export NIX_PATH
|
||||
|
||||
rev=$(newbin/nixos-query nixpkgs.rev)
|
||||
url=$(newbin/nixos-query nixpkgs.url)
|
||||
rev=$(new-nixos-query nixpkgs.rev)
|
||||
url=$(new-nixos-query nixpkgs.url)
|
||||
|
||||
newbin/fetchgit "$rev" "$url" tmp/nixpkgs/$systemname
|
||||
fetchgit "$rev" "$url" tmp/nixpkgs/$systemname
|
||||
)
|
||||
|
||||
./cac poll 10s 2>/dev/null &
|
||||
|
Loading…
Reference in New Issue
Block a user